Skip to content

Commit

Permalink
chore: console
Browse files Browse the repository at this point in the history
  • Loading branch information
boris-w committed May 22, 2024
1 parent afc1104 commit 828c717
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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);
}
Expand Down

0 comments on commit 828c717

Please sign in to comment.