S
Supabase•4w ago
L

Deeplinking back to Mobile App in Email Verifications

I am trying to deeplink back to my mobile app when a user clicks a magic link or a sign up link. As per the docs the href in my a link in the email template is: {{ .RedirectTo }}?token_hash={{ .TokenHash }}&email={{ .Email }} I have also tried this with {{ .SiteURL }} instead of {{ .RedirectTo}}. Anyway the link always comes through in the email as href="#sAmEhAsh?token_hash...". My URL configuration looks correct and I have tried many variations of com.myapp://auth as the Site URL and various com.myapp://** in the Redirect URLs. If I instead use http://localhost:3000 for all of this it comes through correctly. I am wondering if there's either a bug or some explicit thing stopping me from doing it with com.myapp://...
5 Replies
L
LOP•4w ago
Ah, it could well be my email client... Guess I'll do some ugly redirect from a website... Only 8 hours wasted messing around with settings and reading docs 😅
L
LOP•4w ago
In fact yeah, if any devs see this, if you could put a note in the docs that would be useful for future people. https://supabase.com/docs/guides/auth/native-mobile-deep-linking?queryGroups=platform&platform=swift
Native Mobile Deep Linking | Supabase Docs
Set up Deep Linking for mobile applications.
garyaustin
garyaustin•3w ago
Generate an issue in Supabase/supabase issues for docs. This site is not monitored by Supabase regularly. Or make a PR 😎.
silentworks
silentworks•3w ago
What should the note say? I still can't figure out what your solution was from reading your message here.
L
LOP•3w ago
@silentworks Note: Email clients often block app deep-links for user safety. Consider redirecting to a website you control and implementing Universal Links (iOS) (https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content/) and App Links (Android) (https://developer.android.com/training/app-links)

Did you find this page helpful?