Skip to content

Commit

Permalink
fix: treat user.id as optional param (#1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Feb 1, 2021
1 parent e06816a commit e3fd0ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/routes/callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default async (req, res, options, done) => {
name: user.name,
email: user.email,
picture: user.image,
sub: user.id.toString()
sub: user.id?.toString()
}
const jwtPayload = await callbacks.jwt(defaultJwtPayload, user, account, OAuthProfile, isNewUser)

Expand Down Expand Up @@ -179,7 +179,7 @@ export default async (req, res, options, done) => {
name: user.name,
email: user.email,
picture: user.image,
sub: user.id.toString()
sub: user.id?.toString()
}
const jwtPayload = await callbacks.jwt(defaultJwtPayload, user, account, profile, isNewUser)

Expand Down

0 comments on commit e3fd0ad

Please sign in to comment.