In standalone apps, the scheme in app.json always overrides native parameter in makeRedirectUri for expo-auth-session

Please provide the following:

  1. SDK Version: 39
  2. Platforms(Android/iOS/web/all): iOS

When I call makeRedirectUri from expo-auth-session, in a standalone app (iOS), it always returns the scheme set in app.json

For example, in my app.json i have scheme set as myapp, the makeRedirectUri is always myapp://, no matter what i pass into the native parameter in makeRedirectUri. Is this intended?

makeRedirectUri({ native: "myapp://redirect"}) // returns "myapp://"

This is an issue because im trying to use this for Reddit Oauth and reddit oauth does not allow "myapp://" as an uri.

I also tried adding the path option to makeRedirectUri, but this returns 3 slashes for the uri and that is also not allowed by reddit.

makeRedirectUri({ native: "myapp://", path: "redirect"}) // returns "myapp:///redirect"

To work around this,i had to do:

redirectUri = Constants.appOwnership == AppOwnership.Standalone
          ? "myapp://redirect"
          : makeRedirectUri(...),

Is this that best way to do this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.