nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
24.1k stars 3.34k forks source link

sessionToken cookie seems to be broken #8676

Closed jWytrzes closed 11 months ago

jWytrzes commented 11 months ago

Environment

OS: Windows Node 18.17.1 React 18.2.0 Next 13.4.10 Next-auth ^4.22.5

Reproduction URL

https://github.com/nextauthjs/next-auth-example

Describe the issue

I have a NextAuth configured with a custom OAuth Provider, but I noticed that the problem occurs even in next-auth-example repo (signing in with Google)

Authorization seems to be working fine, but the session-token cookie seems to be incorrect. There are more than 3 sections, one of them is empty and it's overall looking weird. What are the possible reasons?

image

How to reproduce

Clone https://github.com/nextauthjs/next-auth-example, add GOOGLE_ID and GOOGLE_SECRET to .env.local and sign in with Google account

Expected behavior

sessionToken cookie is a proper JWT token

balazsorban44 commented 11 months ago

it's a valid, encrypted JWT