You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Next.js app that rewrites some API requests back to an Express.js backend. I want to be able to verify & decode the JWT token in the Express.js backend, how do I do this?
There's the getToken function which seems to be exactly what I'm looking for:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a Next.js app that rewrites some API requests back to an Express.js backend. I want to be able to verify & decode the JWT token in the Express.js backend, how do I do this?
There's the
getToken
function which seems to be exactly what I'm looking for:https://authjs.dev/reference/core/jwt#gettoken
https://next-auth.js.org/tutorials/securing-pages-and-api-routes#using-gettoken
But I can't figure out how to use this in an Express.js route. Does anyone have any working examples/snippets?
Beta Was this translation helpful? Give feedback.
All reactions