# Migrate updateSession to Nextjs Auth0 v4

**URL:** <https://community.auth0.com/t/migrate-updatesession-to-nextjs-auth0-v4/191789>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [September 11, 2025, 11:43am UTC](https://community.auth0.com/t/migrate-updatesession-to-nextjs-auth0-v4/191789 "2025-09-11T11:43:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hummel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hummel/32/73140_2.png) [@hummel](https://community.auth0.com/u/hummel)\
**Post date:** [September 11, 2025, 11:43am UTC](https://community.auth0.com/t/migrate-updatesession-to-nextjs-auth0-v4/191789/1 "2025-09-11T11:43:12Z")

</div>

Our application register a user in the database after authentication by Auth0. And than adds some user details to the session. The was handled in a callback on Page `/api/auth`

During the migration from Nextjs Auth0 v3 to v4 we moved the code to Page `/api/user` including the call to `updateSession`. But the session is no longer updated.

The response header contains: `set-cookie’: [‘appSession=; Path=/; Max-Age=0’]`

Am I missing a step here?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [September 12, 2025, 6:10pm UTC](https://community.auth0.com/t/migrate-updatesession-to-nextjs-auth0-v4/191789/3 "2025-09-12T18:10:17Z")

</div>

Hi @hummel

Welcome to the Auth0 Community!

Did you follow the migration guide available on the NextJS github page [here](https://github.com/auth0/nextjs-auth0/blob/main/V4_MIGRATION_GUIDE.md)?

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [December 9, 2025, 3:51pm UTC](https://community.auth0.com/t/migrate-updatesession-to-nextjs-auth0-v4/191789/4 "2025-12-09T15:51:07Z")

</div>

Hi @hummel

Since I haven’t heard back from you for a while, I will be marking my previous reply as a solution. You can remove the solution before the topic closes automatically if you still experience issues or you can always post again and reference this post.

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 23, 2025, 3:51pm UTC](https://community.auth0.com/t/migrate-updatesession-to-nextjs-auth0-v4/191789/5 "2025-12-23T15:51:24Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
