getToken() doesn't seem to work with a custom cookie name #4306
Answered
by
mirkonasato
mirkonasato
asked this question in
Help
-
The NextAuthOptions allows you to configure custom cookie names, including for the However, the getToken() helper function seems to be using a hard-coded name for the session token cookie. So if you set a custom Am I missing something? |
Beta Was this translation helpful? Give feedback.
Answered by
mirkonasato
Apr 3, 2022
Replies: 1 comment
-
What I did miss is that |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mirkonasato
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What I did miss is that
getToken()
accepts acookieName
option, so if you set a customsessionToken
cookie name in theNextAuth()
options you also need to pass the samecookieName
togetToken()
.