0

I ran into some issues regarding the JWT user being null after a succesfull login.

Did some debugging in the callbacks and saw the following:

2 {
  token: {
    token: {
      name: null,
      email: null,
      picture: null,
      sub: 'e1d4c887-0257-4543-be37-c9b297e2cce6'
    },
    user: {
      id: 'e1d4c887-0257-4543-be37-c9b297e2cce6',
      emailVerified: '2022-09-06T09:54:24.163Z',
      name: null,
      email: null,
      image: null
    },
    account: {
      providerAccountId: 'test@test.com',
      type: 'email',
      provider: 'email'
    },
    isNewUser: false,
    iat: 1662458064,
    exp: 1665050064,
    jti: '521054a5-7ead-43fc-94f4-f5eb7fffde43'
  }
}

I read through the docs and noticed that the correct callback flow would be: signin -> JWT -> Session. It is possible to return the user object found within the signIn callback, but this is not getting passed into the JWT callback.

Due to the fact that some properties like isNewUser are filled in correctly, could the missing user info be related to a DB issue?

What are some things I could further check in the hopes of solving this issue?

Noob
  • 5
  • 3

0 Answers0