From 77a5d0fb6fce6e388f16b08b54c3bc72e260f476 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 28 Dec 2021 17:37:55 +0100 Subject: [PATCH] auth-backend: let adapter populate identity token for auth0 and onelogin Signed-off-by: Patrik Oldsberg --- plugins/auth-backend/src/providers/auth0/provider.ts | 11 ++--------- .../auth-backend/src/providers/onelogin/provider.ts | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/plugins/auth-backend/src/providers/auth0/provider.ts b/plugins/auth-backend/src/providers/auth0/provider.ts index 583f95c621..f14d1b8fd5 100644 --- a/plugins/auth-backend/src/providers/auth0/provider.ts +++ b/plugins/auth-backend/src/providers/auth0/provider.ts @@ -178,10 +178,7 @@ export class Auth0AuthProvider implements OAuthHandlers { } } -const defaultSignInResolver: SignInResolver = async ( - info, - ctx, -) => { +const defaultSignInResolver: SignInResolver = async info => { const { profile } = info; if (!profile.email) { @@ -190,11 +187,7 @@ const defaultSignInResolver: SignInResolver = 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 */ diff --git a/plugins/auth-backend/src/providers/onelogin/provider.ts b/plugins/auth-backend/src/providers/onelogin/provider.ts index 8cb06ea7a7..4f52e31f5b 100644 --- a/plugins/auth-backend/src/providers/onelogin/provider.ts +++ b/plugins/auth-backend/src/providers/onelogin/provider.ts @@ -176,10 +176,7 @@ export class OneLoginProvider implements OAuthHandlers { } } -const defaultSignInResolver: SignInResolver = async ( - info, - ctx, -) => { +const defaultSignInResolver: SignInResolver = async info => { const { profile } = info; if (!profile.email) { @@ -188,11 +185,7 @@ const defaultSignInResolver: SignInResolver = 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 */