Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
r-serega opened this issue Mar 16, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@r-serega
Copy link

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.

@r-serega r-serega added the bug Something isn't working label Mar 16, 2023
@dshukertjr
Copy link
Member

dshukertjr commented Mar 17, 2023

@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
Copy link
Author

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

@r-serega
Copy link
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
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants