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
database.auth.session() and database.auth.user() are both null when called right after const database = createClient(SUPABASE_URL, SUPABASE_ANON_KEY) in a SPA app.
Steps to reproduce the behavior, please provide code snippets or a repository:
Just try the code
Expected behavior
I expect database.auth.session() and database.auth.user() to not return null if a user is connected. I need to check that in my router to change the route if needed, yet can't without doing some custom code because of the null issue. The storage being synchronous, the returns shouldn't be null.
System information
OS: Mac OS
Browser (if applies) [e.g. chrome, safari]
Version of supabase-js: latest
Version of Node.js: latest
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
database.auth.session()
anddatabase.auth.user()
are bothnull
when called right afterconst database = createClient(SUPABASE_URL, SUPABASE_ANON_KEY)
in a SPA app.Steps to reproduce the behavior, please provide code snippets or a repository:
Just try the code
Expected behavior
I expect
database.auth.session()
anddatabase.auth.user()
to not returnnull
if a user is connected. I need to check that in my router to change the route if needed, yet can't without doing some custom code because of thenull
issue. The storage being synchronous, the returns shouldn't benull
.System information
The text was updated successfully, but these errors were encountered: