Readme should mention that appAuthRedirectScheme
must be lowercased for application be able to catch authorization redirect
#659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I was working on migrating existing iOS application to react-native and encountered a problem which took some time for me to debug, so I hope this small readme update can save time for people in similar situation.
The problem was that I had existing
redirectUrl
specified in uppercase like this:Following the docs for react-native-app-auth I have to assign
appAuthRedirectScheme
as aCOMPANY
part of the redirectUrl:But by following this instructions my application failed to catch authorization redirect from sso page to my application.
In fact, although redirectUrl is case-insensitive,
appAuthRedirectScheme
is not: it is a placeholder variable for<data android:scheme />
element in AppAuth-Android RedirectUriReceiverActivity, and the value of this tag should be lowercased according to official Android guide to app manifest.There are existing issues mentioning this problem in other libraries using
net.openid:appauth
(e.g. openid/AppAuth-Android#533 (comment), MaikuB/flutter_appauth#127 (comment) or stackoverflow), but it's very hard to catch without knowing howappAuthRedirectScheme
is used internally.