Open anshkumar23 opened 1 year ago
Have you found what caused this? I'm running into the same problem now
Any updates? I'm also running into the same problem.
Any updates? I'm also running into the same problem.
@joaogabriels Check the response to this issue, see if it helps: #11570 . Basically, my problem was that auth.config
export runs in a middleware on edge environment which creates its own cookie, then another session is created by the auth.ts
export where cookies
were set
Hey @Dragosp33,
I saw your solution and comment in the repository, and I tried to implement it in my project. However, as I am using a configuration with a pages directory, I couldn't apply the solution successfully.
I would like to describe my problem in more detail. The session cookie for my application was set to the domain abc.site.com
, but I updated the configuration to .site.com
. In the production environment, some users were already logged in, and the cookies from the old domain are conflicting with the new domain cookies, preventing the correct session retrieval.
I tried deleting the old cookies, but that seems to be impossible. So far, I am still looking for a solution to this problem.
Environment
OS: Windows
Binaries: node v18.17.0 npm v9.6.7
Libraries: next v13.4.9 next-auth v4.22.1 react v18.2.0
Reproduction URL
private repo
Describe the issue
Hi,
I am using next-auth v4.22.1 and we are seeing two session token cookies are created. We have explicitly set the domain as the root domain. Yet, one session cookie is created for root domain and another for subdomain. As a result, the signOut does not work. It just reloads the page and session cookies are updated.
How to reproduce
Hi,
I am using next-auth v4.22.1 and we are seeing two session token cookies are created. We have explicitly set the domain as the root domain. Yet, one session cookie is created for root domain and another for subdomain. As a result, the signOut does not work. It just reloads the page and session cookies are updated.
Expected behavior