Skip to content

Can't get session and user after success call supabase.auth.signInWithOAuth(Provider.******) #45

@r-serega

Description

@r-serega

Can't get session and user after success call supabase.auth.signInWithOAuth(Provider.******)

After signing into the app with supabase.auth.signInWithOAuth(Provider.******);
it is clear that everything worked correctly, the user's photo appears in the window.
But I can't get session and user: Supabase.instance.client.auth.currentSession == null
and Supabase.instance.client.auth.currentUser == null.
In the supabase console, the new user is not added to the user list.

Prompt the decision of reception of session and the user after OAUTH authorization.

Activity

dshukertjr

dshukertjr commented on Mar 17, 2023

@dshukertjr
Member

@r-serega
Have you setup deep links to bring the user back to the app after completing the OAuth sign in? If not, Supabase would not be able to complete the sign in.

You can follow here to configure deep links.

r-serega

r-serega commented on Mar 17, 2023

@r-serega
Author

are you talking about this page?
supabase_oauth4
so they are listed

r-serega

r-serega commented on Mar 17, 2023

@r-serega
Author

I found one piece of advice in this post . Where is a link to a working application that solves my problem.

Supabase.instance.client.auth.signInWithProvider( supabase.Provider.github, options: supabase.AuthOptions(redirectTo: authRedirectUri), );

I will investigate, maybe this will solve the problem

Subrataporwal

Subrataporwal commented on Oct 4, 2023

@Subrataporwal

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dshukertjr@Subrataporwal@r-serega

        Issue actions

          Can't get session and user after success call supabase.auth.signInWithOAuth(Provider.******) · Issue #45 · supabase-community/flutter-auth-ui