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
Am experimenting with @next of auth-helpers due to #171 and announcement of https://supabase.com/blog/supabase-js-v2 which appears to address the signed out issue as @latest doesn't use @supabase/supabase-js@rc.
As the /api/auth helpers are no longer in this package, I created a new API logout endpoint that calls supabaseClient.auth.signOut(). However, the signed out state does not appear to reflect client-side. It retains the current session and onAuthStateChange does not fire with the SIGNED_OUT event. Signing out on the client works fine.
If we wanted to keep supabase calls in the API like the latest helper, how would we trigger an update in the client to fetch the current session state?
I understand that @next is in progress and that this issue may be moot once it is released, but I want to raise this just in case.
To Reproduce
With @next versions of helpers and @rc of supabase-js in nextjs:
While authenticated in the client (and using the new SessionContextProvider), call await supabaseClient.auth.signOut(); from an /api endpoint.
onAuthStateChange will not fire SIGNED_OUT event, client will show past session, while subsequent /api calls will have no active session.
Expected behavior
For signed out session state initiated in next.js API to reflect in the client.
System information
OS: macOS
Browser (if applies) Chrome
Version of supabase-js: see above
Version of Node.js: 16.14.2
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
Am experimenting with
@next
of auth-helpers due to #171 and announcement of https://supabase.com/blog/supabase-js-v2 which appears to address the signed out issue as@latest
doesn't use@supabase/supabase-js@rc
.As the
/api/auth
helpers are no longer in this package, I created a new API logout endpoint that callssupabaseClient.auth.signOut()
. However, the signed out state does not appear to reflect client-side. It retains the current session andonAuthStateChange
does not fire with theSIGNED_OUT
event. Signing out on the client works fine.If we wanted to keep supabase calls in the API like the latest helper, how would we trigger an update in the client to fetch the current session state?
I understand that @next is in progress and that this issue may be moot once it is released, but I want to raise this just in case.
To Reproduce
With
@next
versions of helpers and@rc
of supabase-js in nextjs:While authenticated in the client (and using the new
SessionContextProvider
), callawait supabaseClient.auth.signOut();
from an/api
endpoint.onAuthStateChange
will not fireSIGNED_OUT
event, client will show past session, while subsequent/api
calls will have no active session.Expected behavior
For signed out session state initiated in next.js API to reflect in the client.
System information
The text was updated successfully, but these errors were encountered: