From 828c717a90c1b77a22a3b58f6b1bb32631a6549e Mon Sep 17 00:00:00 2001 From: Boris Date: Wed, 22 May 2024 17:31:30 +0800 Subject: [PATCH] chore: console --- .../src/features/auth/strategies/oidc.strategy.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/nestjs-backend/src/features/auth/strategies/oidc.strategy.ts b/apps/nestjs-backend/src/features/auth/strategies/oidc.strategy.ts index 4bc477022..13d560776 100644 --- a/apps/nestjs-backend/src/features/auth/strategies/oidc.strategy.ts +++ b/apps/nestjs-backend/src/features/auth/strategies/oidc.strategy.ts @@ -17,7 +17,6 @@ export class OIDCStrategy extends PassportStrategy(Strategy, 'openidconnect') { oauthStoreService: OauthStoreService ) { const { other, ...rest } = config.oidc; - console.log('OIDCStrategy', other); super({ ...rest, state: true, @@ -30,7 +29,7 @@ export class OIDCStrategy extends PassportStrategy(Strategy, 'openidconnect') { const { id, emails, displayName, photos } = profile; const email = emails?.[0].value; if (!email) { - throw new UnauthorizedException('No email provided from Google'); + throw new UnauthorizedException('No email provided from OIDC'); } const user = await this.usersService.findOrCreateUser({ name: displayName, @@ -41,7 +40,7 @@ export class OIDCStrategy extends PassportStrategy(Strategy, 'openidconnect') { avatarUrl: photos?.[0].value, }); if (!user) { - throw new UnauthorizedException('Failed to create user from Google profile'); + throw new UnauthorizedException('Failed to create user from OIDC profile'); } return pickUserMe(user); }