Native Mobile Deep Linking
In certain auth scenarios you will need to handle linking back into your application to finish the user's sign in.
When do you need to setup deep links
- Magic link login.
- Have
confirm email
enabled and are using email login. - Resetting password for email login.
- Calling
.signInWithOAuth()
method.
To link to your development build or standalone app, you need to specify a custom URL scheme for your app. You can register a scheme in your app config (app.json, app.config.js) by adding a string under the scheme
key:
In your project's auth settings add the redirect URL, e.g. com.supabase://**
.
Finally, implement the OAuth and linking handlers. See the supabase-js reference for instructions on initializing the supabase-js client in React Native.
For the best user experience it is recommended to use universal links which require a more elaborate setup. You can find the detailed setup instructions in the Expo docs.