FormidableLabs / react-native-app-auth

React native bridge for AppAuth - an SDK for communicating with OAuth2 providers
https://commerce.nearform.com/open-source/react-native-app-auth
MIT License
2.04k stars 441 forks source link

Issue on iOS when redirecting back to the redirect_uri with the ?code parameter attached #969

Open mmaier opened 6 months ago

mmaier commented 6 months ago

Issue

There is a weird behaviour when the redirect_uri attached code parameter is not of the format "schema://path?code=123" but "schema://path/?code=123" (notice the appended "/" between "path" and "?code=". While on Android everything works fine, on iOS nothing happens anymore - the screen seem to get stuck. Even no error is raised. Took me quite a while to figure this out.


Environment

carbonrobot commented 6 months ago

Azure has this same issue, we are happy to accept a PR for a doc update!

mmaier commented 5 months ago

it's only working when setting iosCustomBrowser: "safari" - but that gets rejected by Apple due to bad user experience. The only workaround is to add the / to the oauth redirect url