Next.js Discord

Discord Forum

NextAuth.js custom token callback response

Unanswered
Nile Crocodile posted this in #help-forum
Open in Discord
Nile CrocodileOP
Hello, I'd like to modify the TokenSet so that the response my API gives corresponds to the TokenSet I've modified.

The response from my API :
  response_status: 200,
  response_code: 'S_AUTH_LOGIN',
  reponse_message: 'User logged in',
  isError: false,
  payload: {
    access_token: 'eyJhbGciOiJS......',
    token_type: 'bearer',
    expires_in: null,
    expires_at: '2024-03-14T16:05:55.357+01:00',
    refresh_token: '7bc927eb39.......'
  }


The basic response from NextAuth.js :

{
      access_token: 'eyJhbGciOiJS.......',
      token_type: 'bearer',
      expires_at: '2024-03-14T15:58:43.648+01:00',
      refresh_token: '7bc927eb39.......'
}

0 Replies