Using JWS in v4 getToken not working. #4712
Unanswered
transformmindgarden
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I believe there may be a bug with the overriding of the decode functionality. When you override the encode and decode, the login works properly and your session gets stored properly. However, if you attempt to get the token using getToken() (import { getToken } from "next-auth/jwt") it will call the default decoder in index.js of the next-auth/jwt module not the decode method used to override.
Overwriting the decode in the index.js of next-auth/jwt resolves the issue of getToken() not working, but is undesirable.
Am I missing something? or is this a bug with overriding encode and decode? using version 4.3.1
Here is an example of JWS encode/decode functions in [..nextauth].js:
Beta Was this translation helpful? Give feedback.
All reactions