Skip to content

Commit

Permalink
fix(provider): add sub to defaultJwtPayload for credentials provider. (
Browse files Browse the repository at this point in the history
…#1725)

Co-authored-by: Joseph Chen <jchen@dogomedia.com>
  • Loading branch information
dogomedia-github and jcdogo committed Apr 20, 2021
1 parent 1cbf73b commit ae26df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/routes/callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ export default async function callback (req, res) {
const defaultJwtPayload = {
name: user.name,
email: user.email,
picture: user.image
picture: user.image,
sub: user.id?.toString()
}
const jwtPayload = await callbacks.jwt(defaultJwtPayload, user, account, userObjectReturnedFromAuthorizeHandler, false)

Expand Down

1 comment on commit ae26df0

@vercel
Copy link

@vercel vercel bot commented on ae26df0 Apr 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.