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
{{ message }}
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
When using the client and auth functions, some internally call a _removeSession function, presumably to clear the session before attempting any auth-related logic. This effectively clears out the local session data used to keep the user logged in. In many cases the function runs and restores or resets the session data eventually. However, if the function fails, this does not trigger the SIGNED_OUT to notify any even handlers and hooks that the session data is no longer present, causing inconsistent auth data states.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Create a supabase client instance.
In your app, use the auth-helpers-react lib and use the useSession hook to get the session data.
Trigger a function like supabase.auth.resend with invalid params to trigger an error and session remove.
This causes the session data to be erased, but the context data of the useSession hook is not updated and retains the old values.
Expected behavior
Any auth function that fails and deletes the auth session data should trigger a SIGNED_OUT event to notify any other serives.
Bug report
Describe the bug
When using the client and auth functions, some internally call a
_removeSessionfunction, presumably to clear the session before attempting any auth-related logic. This effectively clears out the local session data used to keep the user logged in. In many cases the function runs and restores or resets the session data eventually. However, if the function fails, this does not trigger the SIGNED_OUT to notify any even handlers and hooks that the session data is no longer present, causing inconsistent auth data states.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
auth-helpers-reactlib and use theuseSessionhook to get the session data.supabase.auth.resendwith invalid params to trigger an error and session remove.useSessionhook is not updated and retains the old values.Expected behavior
Any auth function that fails and deletes the auth session data should trigger a
SIGNED_OUTevent to notify any other serives.System information