-
Notifications
You must be signed in to change notification settings - Fork 432
Open
Labels
Description
Checklist
- The issue can be reproduced in the nextjs-auth0 sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
When calling auth0.updateSession(req, res, session)
in a Page router endpoint, response header set-cookie
is empty. And the session is never updated on the client.
'set-cookie': [ 'appSession=; Path=/; Max-Age=0' ]
Reproduction
In a Page API route add the following code.
let session = await auth0.getSession(req);
session.user.username = "younameit";
await auth0.updateSession(req, res, session);
console.log(res.getHeaders());
Additional context
No response
nextjs-auth0 version
4.9.0
Next.js version
15.5.2
Node.js version
20.18.0