createBrowserClient logs users out if there's a error_description
query parameter
#74
Open
2 tasks done
Labels
bug
Something isn't working
Bug report
Describe the bug
createBrowserClient
from@supabase/ssr
will log users out on Next.js on any client-rendered page with anerror_description
query parameter.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
npx create-next-app -e with-supabase
and fill out.env.local
withNEXT_PUBLIC_SUPABASE_URL
andNEXT_PUBLIC_SUPABASE_ANON_KEY
as described on Use Supabase with Next.jsapp/frontend/page.js
to fetch the user following the template from the starter kit:pre
tagerror_description
query parameter with any value (ex: /frontend?error_description=a) and you'll be logged outI think there are other OAuth-related query parameters that evoke the same bug.
Expected behavior
You should not be logged out.
This was super hard to track down and looks like it's causing other issues involving OAuth flows like Auth: User unexpectedly logs out when linking new OAuth provider fails
System information
Additional context
This bug doesn't happen on server-rendered pages like /protected.
The text was updated successfully, but these errors were encountered: