5

I'm trying to set up auth in supabase

Following the tutorial, I try adding domain 'io.supabase.flutterquickstart://login-callback/'

but nothing happens. Maybe this is a bug in the software, not sureenter image description here

5
  • I'm sorry to hear that you haven't been able to add Redirect URLs. Have you opened your console on the browser to see if there were any error messages? What happens when you press the "Add Domain" button in the popup?
    – dshukertjr
    Aug 4, 2022 at 3:18
  • Open issue on GitHub: github.com/supabase/supabase/issues/…
    – igdmitrov
    Aug 5, 2022 at 8:22
  • I tested it on Safari and Google Chrome and it works. Can you please test it again after rolled out a patch?
    – igdmitrov
    Aug 5, 2022 at 8:23
  • There was a bug on Supabase's auth server that has now been fixed. Can you try it and see if you are still getting the same bug?
    – dshukertjr
    Aug 8, 2022 at 5:26
  • Same problem for me! Oct 20, 2022 at 15:37

3 Answers 3

6

I already commented on the Github issue but for reference here as well:

Maybe a hint because I tripped over this twice now in 3 days. Make sure you have a slash at the end of the URL in the additional Redirect URLs and check the API call sent to supabase to compare. My problem was that the first localhost address works, but the second doesn't because of the missing slash. If it doesn't find the exact URL, it defaults to the "Site URL" address:

enter image description here

3
  • To include all variants you can add "*" like this: http://**127.0.0.1:3000/*/* Jan 25, 2023 at 18:14
  • 1
    They mentioned this in their documentation but I didn't understand it all. Your answer really helped me, coz my redirectTo URL I put an extra slash but the one on redirect URL did not have a forward slash at the end. Thanks!!!! Jul 2, 2023 at 8:30
  • It seems they've been updating the wildcards, now you can use ** (double asterisk to include everything after. Check supabase.com/docs/guides/auth/concepts/redirect-urls
    – Jose A
    Apr 7 at 17:47
1

Don't change redirect URLs instead, change site URL with your production URL. You can go to authentication > under configuration - URL configuration > change the site URL to production URL and it will work for google auth. I was facing issue in google auth after successful login. And this works for me...

enter image description here

0

I had the same issue (followed the same tutorial), but i just CTRL+C CTRL+V everything expect the io.supabase.* and created a custom one.

But there is an important Line on the login_page.dart file.

  await supabase.auth.signInWithOtp(
        email: _emailController.text,
        emailRedirectTo: kIsWeb ? null : 'io.supabase.flutterquickstart://login-callback/',
      );

So if youre facing the same issue, i recommend reading through the code and changing the emailRedirectTo to your own value if you changed it.

I havent figured it out for solid 30min because normal Deep-Linking works just fine, but the redirect stuff isnt setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.