auth-backend: let adapter populate identity token for auth0 and onelogin

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-12-28 17:37:55 +01:00
parent 2f26120a36
commit 77a5d0fb6f
2 changed files with 4 additions and 18 deletions
@@ -178,10 +178,7 @@ export class Auth0AuthProvider implements OAuthHandlers {
}
}
const defaultSignInResolver: SignInResolver<OAuthResult> = async (
info,
ctx,
) => {
const defaultSignInResolver: SignInResolver<OAuthResult> = async info => {
const { profile } = info;
if (!profile.email) {
@@ -190,11 +187,7 @@ const defaultSignInResolver: SignInResolver<OAuthResult> = async (
const id = profile.email.split('@')[0];
const token = await ctx.tokenIssuer.issueToken({
claims: { sub: id, ent: [`user:default/${id}`] },
});
return { id, token };
return { id, token: '' };
};
/** @public */
@@ -176,10 +176,7 @@ export class OneLoginProvider implements OAuthHandlers {
}
}
const defaultSignInResolver: SignInResolver<OAuthResult> = async (
info,
ctx,
) => {
const defaultSignInResolver: SignInResolver<OAuthResult> = async info => {
const { profile } = info;
if (!profile.email) {
@@ -188,11 +185,7 @@ const defaultSignInResolver: SignInResolver<OAuthResult> = async (
const id = profile.email.split('@')[0];
const token = await ctx.tokenIssuer.issueToken({
claims: { sub: id, ent: [`user:default/${id}`] },
});
return { id, token };
return { id, token: '' };
};
/** @public */