Hi all,
I'm building a React Native app using Expo (in a development build on Android), and I'm integrating Strava OAuth. I'm using a custom URI scheme for redirection, generated like this:
const redirectUri = AuthSession.makeRedirectUri({ scheme: 'runquest', path: 'strava-redirect', });
This results in a URI like:
runquest://strava-redirect
I'm primarily using the mobile authorization endpoint:
https://www.strava.com/oauth/mobile/authorize
But I’ve also tried the standard web endpoint:
https://www.strava.com/oauth/authorize
In both cases, when the user clicks "Authorize", I receive an "invalid redirect_uri" error from Strava.
What I’ve tried:
-
Setting
"runquest"
as the Authorized Callback Domain in the Strava Developer Dashboard -
Setting
"localhost"
as the Authorized Callback Domain in the Strava Developer Dashboard -
Trying variations like
runquest://
,runquest://strava-redirect
, andrunquest
-
Testing with both OAuth endpoints
My questions:
-
What should I enter in the Authorized Callback Domain field if I'm using a custom URI scheme like
runquest://strava-redirect
? -
Does Strava support custom URI schemes for mobile redirects, or only HTTPS URLs?
-
Is this issue expected in Expo development builds, particularly on Android?
Any clarification or examples of working Expo + Strava OAuth setups using custom schemes would be a huge help.
Thanks in advance!