Bug report
Describe the bug
I'm building a Capacitor app with Supabase and am including Google and Apple as auth providers. I also have a web application built with Next.js using the same Supabase instance.
When signing in to the mobile app with Google on iOS, the user successfully gets redirected back to the mobile app and logged in. When signing in with Apple, it redirects to the web app with the credentials in the URL instead of deep linking to the app (even though I'm using the same redirect to url for both providers).
I need to read up more on GoTrue, but maybe it has something to do with including the redirectTo in the callback url? The call to /authorize will include redirectTo but the callback is set statically.
To Reproduce
- Configure Apple as an auth provider in Supabase (I know the Apple config works because users can sign into the web app successfully)
- Configure deep links with Capacitor
- In the app, the user signs in with Supabase
await sb.auth.signIn({ provider: <apple or google> }, { redirectTo: "mysite.com/mobile" })
- The web app ignores the session in the url and handles it manually if it's not going to the "mobile" url so it's not consuming the mobile credentials (
supabaseClient = createClient(url, key, { detectSessionInUrl: false }))
- Deep links are configured successfully and included in the Supabase auth configuration for additional redirect urls. If I copy the url that appears after signing in with Apple to another app like Notes and click it, it opens the mobile app and logs the user in which is the expected behavior.
Unfortunately I'm not sure of a great way to make a reproducible example given the amount of config that goes into setting up deep links + sign in with Apple.
Expected behavior
- User clicks signs in with Apple
- User authenticates with Apple
- Redirect back to the mobile app
- User is signed in
System information
- OS: iOS
- Version of supabase-js: 1.35.7
Bug report
Describe the bug
I'm building a Capacitor app with Supabase and am including Google and Apple as auth providers. I also have a web application built with Next.js using the same Supabase instance.
When signing in to the mobile app with Google on iOS, the user successfully gets redirected back to the mobile app and logged in. When signing in with Apple, it redirects to the web app with the credentials in the URL instead of deep linking to the app (even though I'm using the same redirect to url for both providers).
I need to read up more on GoTrue, but maybe it has something to do with including the redirectTo in the callback url? The call to
/authorizewill include redirectTo but the callback is set statically.To Reproduce
await sb.auth.signIn({ provider: <apple or google> }, { redirectTo: "mysite.com/mobile" })supabaseClient = createClient(url, key, { detectSessionInUrl: false }))Unfortunately I'm not sure of a great way to make a reproducible example given the amount of config that goes into setting up deep links + sign in with Apple.
Expected behavior
System information