fix(core): Open oauth callback endpoints to be public (#3168)

This commit is contained in:
Omar Ajoue
2022-04-25 10:51:50 +02:00
committed by GitHub
parent 0448feec56
commit 01807d6136
4 changed files with 30 additions and 13 deletions

View File

@@ -753,3 +753,13 @@ export async function getCredentialForUser(
return sharedCredential.credentials as ICredentialsDb;
}
/**
* Get a credential without user check
*/
export async function getCredentialWithoutUser(
credentialId: string,
): Promise<ICredentialsDb | undefined> {
const credential = await Db.collections.Credentials.findOne(credentialId);
return credential;
}