Skip to content

Commit 55e48d4

Browse files
docs: add app links to android doc
1 parent 1149bf6 commit 55e48d4

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/docs/introduction.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,35 @@ The scheme is the beginning of your OAuth Redirect URL, up to the scheme separat
257257
is `com.myapp://oauth`, then the url scheme will is `com.myapp`. The scheme must be in lowercase.
258258
259259
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).
260+
261+
#### App Links
262+
263+
If your your OAuth Redirect URL is an [App Links](https://developer.android.com/training/app-links), you need to the following code to your `AndroidManifest.xml`:
264+
265+
```
266+
<activity
267+
android:name="net.openid.appauth.RedirectUriReceiverActivity"
268+
android:exported="true">
269+
<intent-filter android:autoVerify="true">
270+
<action android:name="android.intent.action.VIEW"/>
271+
<category android:name="android.intent.category.DEFAULT"/>
272+
<category android:name="android.intent.category.BROWSABLE"/>
273+
<data android:scheme="https"
274+
android:host=example.domain />
275+
</intent-filter>
276+
</activity>
277+
```
278+
279+
where the `host` is the domain of your redirect uri.
280+
281+
You need to add the `manifestPlaceholders` as described in the section above:
282+
283+
```
284+
android {
285+
defaultConfig {
286+
manifestPlaceholders = [
287+
appAuthRedirectScheme: 'example.domain'
288+
]
289+
}
290+
}
291+
```

0 commit comments

Comments
 (0)