supabase-swift icon indicating copy to clipboard operation
supabase-swift copied to clipboard

OTP auth not working. The app required to open that link can't be found

Open iamgabrielma opened this issue 9 months ago • 1 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Following the official tutorial at https://supabase.com/docs/guides/auth/social-login/auth-apple?queryGroups=platform&platform=swift as well as the video at https://www.youtube.com/watch?v=enVDRqzmudo , state.session it's always nil on supabase.auth.authStateChanges as the logic callback does not work.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Follow the tutorial implementation, observe how despite creating new row in the profiles table, users cannot login via mobile app:
Image

Structure of the URL that attempts to open shows as: https://SUPABASE_URL/auth/v1/verify?token=TOKEN&type=magiclink&redirect_to=io.supabase.user-management://login-callback

Image

Expected behavior

To be able to login

Screenshots

See above

System information

  • OS: iOS
  • Browser: Safari, DuckDuckGo
  • Latest Supabase-swift

Additional context

Add any other context about the problem here.

iamgabrielma avatar Mar 29 '25 05:03 iamgabrielma

Hi @iamgabrielma the linked tutorial is unrelated to OTP, so not sure exactly what you're following.

For redirecting back to the app from the link, you need to correctly setup mobile deep linking, check the guide in https://supabase.com/docs/guides/auth/native-mobile-deep-linking?queryGroups=platform&platform=swift

Let me know if that helps you. Thanks.

grdsdev avatar Mar 31 '25 10:03 grdsdev

Closing since I think my last comment solves your issue, feel free to reopen it otherwise.

grdsdev avatar Apr 28 '25 22:04 grdsdev