[next-auth][error][JWT_SESSION_ERROR] "\nhttps://next-auth.js.org/errors#jwt_session_error" "decryption operation failed" {} #12865
Unanswered
abdulazizkhatamov
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
-
I am running 2 next js projects concurrently... one for admin and one for customer... I implemented next-auth in both projects, and I am using 2 different NEXTAUTH_SECRET for both projects.. now if i login to admin and visit customer project, I will have error.
Error: [next-auth][error][JWT_SESSION_ERROR] "\nhttps://next-auth.js.org/errors#jwt_session_error" "decryption operation failed" {}
Reason of error: This can also occur if you have changed the NEXTAUTH_SECRET, but you still had an active session with the old secret. Logging in again solves the issue.
In my case, how to solve my problem ? I tried changing cookies keys for both project, but it is not helping...
Customer auth.ts: https://gist.github.com/abdulazizkhatamov/8558247209c22382f5cf0cf658053ac8
Admin auth.ts: https://gist.github.com/abdulazizkhatamov/992e8a5558373e7b12f44e5f98668dd9
Error screenshot:

Beta Was this translation helpful? Give feedback.
All reactions