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

linkIdentity always redirects to "Site URL" instead of a valid "redirect URL" (web) #1927

Open
willsmanley opened this issue Jan 23, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@willsmanley
Copy link

Lets say you run flutter for web and specify port 7357, and in your auth URL settings you list your primary domain at the top as site url (https://primarydomain.com) and then at the bottom in redirect URLs you list your primary domain and local testing URI: (https://primarydomain.com, http://localhost:7357)

flutter run -d chrome --web-port=7357

While window.location.href == 'http://localhost:7357', signInWithOAuth works perfectly. It navigates to consent screen and then right back to http://localhost:7357:

await Supabase.instance.client.auth.signInWithOAuth(OAuthProvider.apple, redirectTo: window.location.href);

However for anonymous users, this linkIdentity always redirects to "Site URL" (the primary domain), even if you specify a valid redirectTo URL that is stored in redirect URLs here:

await Supabase.instance.client.auth.linkIdentity(OAuthProvider.apple, redirectTo: window.location.href);

This is a supabase side issue, not specific to google or apple or other oauth provider.

It's also not really a flutter SDK issue, it is a supabase backend issue (I think) but theres not a general place to open an issue as far as I know.

@willsmanley willsmanley added the bug Something isn't working label Jan 23, 2025
@willsmanley willsmanley changed the title linkIdentity always redirects to "Site URL" instead of a valid "redirect URL" linkIdentity always redirects to "Site URL" instead of a valid "redirect URL" (web) Jan 23, 2025
@dshukertjr dshukertjr added auth and removed auth labels Jan 27, 2025
@dshukertjr dshukertjr transferred this issue from supabase/supabase-flutter Jan 27, 2025
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

2 participants