You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a Next.JS application, when the user JWT access token is too large, the supabase auth library splits it into sections and sends it in the cookies in the following manner:
These cookies are randomly deleted from the browser storage, which causes auth issues in the application. We have not identified the cause, but it happens when the JWT is split into multiple cookies.
To Reproduce
Create a user in your auth table and add a large dummy raw_user_meta_data JSON object
In a next page, add the SSR createBrowserClient
Login
Check the cookies panel in your browser and look for sb-project-auth-token.0
Navigate around the page, refresh or wait a while
Cookies are randomly deleted
Expected behavior
Cookies are kept in memory until a signout event happens or the cookies are cleared manually.
System information
Browser (if applies) Firefox
Version of supabase-js: 2.39.3
Additional context
We are using the Next.js framework
The text was updated successfully, but these errors were encountered:
We've found this happen when the server thinks the cookie is invalid. For us, this happened when our framework wasn't url decoding the cookie, so it failed to JSON.parse.
Bug report
Describe the bug
In a Next.JS application, when the user JWT access token is too large, the supabase auth library splits it into sections and sends it in the cookies in the following manner:
These cookies are randomly deleted from the browser storage, which causes auth issues in the application. We have not identified the cause, but it happens when the JWT is split into multiple cookies.
To Reproduce
raw_user_meta_data
JSON objectsb-project-auth-token.0
Expected behavior
Cookies are kept in memory until a signout event happens or the cookies are cleared manually.
System information
Additional context
We are using the Next.js framework
The text was updated successfully, but these errors were encountered: