Hello, Auth0 forums -
I’m wondering if it is possible to read / unsign an Auth0 session cookie in an Node / Express application. I am generating this cookie via a Next.js application using the nextjs-auth0 module and am able to read it in the app using the built in
getSession method provided by the library.
The problem, however, is that I am now wanting to call an external API that I have built in Express and am having a hard time reading the
a0:session cookie. Of course I have the session cookie secret that I am initializing the Next library with, however, I can’t seem to piece together how to unsign the cookie when utilizing the same secret.
Is there a library that I can use to be able to read an existing Auth0 session cookie? If not, is there any way to validate a user through the cookie in Express?
For clarification, I am not trying to store sessions in an express app. I am trying to authenticate a user based on the session cookie sent in a request from a client.
- Which SDK this is regarding: nextjs-auth0
- SDK Version: e.g. 0.16.1
- Platform Version: e.g. Node 14.16.1