Skip to content

Supabase session being reset on every page load #1691

@bbarr

Description

@bbarr

https://github.com/supabase/auth-js/blob/b045965298863ea5a085b96b2e21d5dfd31175ec/src/GoTrueClient.ts#L310

I notice that because detectSessionInUrl is always true, the auth code is looking for the session in the URL and when it isn't there (every load other than magic link, in my application), it is treating it as an error and resetting.

This wasn't happening the other day, and I don't think I have changed my Supabase version, so it must be a problem with my implementation somehow.. and yet, when I walk through the trace, it clearly gets to this point in the auth library every load, and of course, there is no session info still in the URL, and it kills the session. Can someone better help me understand how detectSessionInUrl is supposed to work?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    auth-jsRelated to the auth-js library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions