Skip to content

Commit

Permalink
(fix) Invalid Google token (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniikulisidi authored Jul 22, 2023
1 parent 62f035f commit 7f97bbc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/production/src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,11 @@ export class AuthService {
return await this.handleExistingUserGoogle(user, headers, ip)
} catch (error) {
console.error(`[ERROR][AuthService -> authenticateGoogle]: ${error}`)

if (error === 'invalid_token') {
throw new BadRequestException('Google token is expired')
}

throw new InternalServerErrorException(
'Something went wrong while authenticating user with Google',
)
Expand Down

0 comments on commit 7f97bbc

Please sign in to comment.