auth-backend: let adapter populate identity token for auth0 and onelogin
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user