Skip to content

Commit e75f6c8

Browse files
authored
Include notes for implementing with React Navigation deep linking (FormidableLabs#614)
* Updated README to relfect RN 0.63+ support * updated READMEs to clarify reactnavigation deep linking android integration
1 parent b22f11c commit e75f6c8

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Example/README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,18 @@ yarn
2323
npx react-native run-android
2424
```
2525

26-
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.
26+
### Notes
27+
* 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.
28+
* 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).
29+
30+
Example:
31+
```
32+
// build.gradle
33+
android {
34+
defaultConfig {
35+
manifestPlaceholders = [
36+
appAuthRedirectScheme: 'io.identityserver.demo.auth'
37+
]
38+
}
39+
}
40+
```

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ android {
408408
The scheme is the beginning of your OAuth Redirect URL, up to the scheme separator (`:`) character. E.g. if your redirect uri
409409
is `com.myapp://oauth`, then the url scheme will is `com.myapp`.
410410
411+
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).
412+
411413
## Usage
412414
413415
```javascript

0 commit comments

Comments
 (0)