Bug report
Describe the bug
When using PKCE OAuth from on iOS with a custom URL scheme that has no path (ex. myapp://), the redirect URL returned to the app contains a corrupted auth code a trailing %23 (URL-encoded #). This causes exchangeCode ForSession to fail with "No valid flow state found".
To Reproduce
- Create an Expo React Native app targeting iOS
- Use
makeRedirectUri() with no arguments → returns myapp://
- Call
supabase.auth.signInWithOAuth({ provider: 'google', options: { redirectTo: 'myapp://', skipBrowserRedirect: true } })
- Open the auth URL with
WebBrowser.openAuthSessionAsync
- Complete Google sign-in
- Observe
result.url contains myapp:?code=CODE%23 instead of myapp://?code=CODE
exchangeCodeForSession fails with "No valid flow state found"
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: [e.g. macOS, Windows]
- Browser (if applies) [e.g. chrome, safari]
- Version of supabase-js: [e.g. 6.0.2]
- Version of Node.js: [e.g. 10.10.0]
Additional context
Add any other context about the problem here.
Bug report
Describe the bug
When using PKCE OAuth from on iOS with a custom URL scheme that has no path (ex.
myapp://), the redirect URL returned to the app contains a corrupted auth code a trailing%23(URL-encoded#). This causesexchangeCode ForSessionto fail with "No valid flow state found".To Reproduce
makeRedirectUri()with no arguments → returnsmyapp://supabase.auth.signInWithOAuth({ provider: 'google', options: { redirectTo: 'myapp://', skipBrowserRedirect: true } })WebBrowser.openAuthSessionAsyncresult.urlcontainsmyapp:?code=CODE%23instead ofmyapp://?code=CODEexchangeCodeForSessionfails with "No valid flow state found"Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.