diff --git a/Example/README.md b/Example/README.md index 84ccbcbd..642921be 100644 --- a/Example/README.md +++ b/Example/README.md @@ -23,4 +23,18 @@ yarn npx react-native run-android ``` -Note that you have to have the emulator open before running the last command. If you have difficulty getting the emulator to connect, open the project from Android Studio and run it through there. +### Notes +* You have to have the emulator open before running the last command. If you have difficulty getting the emulator to connect, open the project from Android Studio and run it through there. +* ANDROID: When integrating with a project that utilizes deep linking (e.g. [React Navigation deep linking](https://reactnavigation.org/docs/deep-linking/#set-up-with-bare-react-native-projects)), update the redirectUrl in your config and the `appAuthRedirectScheme` value in build.gradle to use a custom scheme so that it differs from the scheme used in your deep linking intent-filter [as seen here](https://github.com/FormidableLabs/react-native-app-auth/issues/494#issuecomment-797394994). + +Example: +``` +// build.gradle +android { + defaultConfig { + manifestPlaceholders = [ + appAuthRedirectScheme: 'io.identityserver.demo.auth' + ] + } +} +``` diff --git a/README.md b/README.md index 1c0b9bc7..df158e77 100644 --- a/README.md +++ b/README.md @@ -408,6 +408,8 @@ android { The scheme is the beginning of your OAuth Redirect URL, up to the scheme separator (`:`) character. E.g. if your redirect uri is `com.myapp://oauth`, then the url scheme will is `com.myapp`. +NOTE: When integrating with [React Navigation deep linking](https://reactnavigation.org/docs/deep-linking/#set-up-with-bare-react-native-projects), be sure to make this scheme (and the scheme in the config's redirectUrl) unique from the scheme defined in the deep linking intent-filter. E.g. if the scheme in your intent-filter is set to `com.myapp`, then update the above scheme/redirectUrl to be `com.myapp.auth` [as seen here](https://github.com/FormidableLabs/react-native-app-auth/issues/494#issuecomment-797394994). + ## Usage ```javascript