From 55e48d4e097a91c7f2a10829e4dd972f5c20b5cb Mon Sep 17 00:00:00 2001 From: Francesco-Voto Date: Tue, 11 Feb 2025 20:03:09 +0100 Subject: [PATCH 1/3] docs: add app links to android doc --- docs/docs/introduction.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index 0e17929d..d96c7c48 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -257,3 +257,35 @@ The scheme is the beginning of your OAuth Redirect URL, up to the scheme separat is `com.myapp://oauth`, then the url scheme will is `com.myapp`. The scheme must be in lowercase. 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). + +#### App Links + +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`: + +``` + + + + + + + + +``` + +where the `host` is the domain of your redirect uri. + +You need to add the `manifestPlaceholders` as described in the section above: + +``` +android { + defaultConfig { + manifestPlaceholders = [ + appAuthRedirectScheme: 'example.domain' + ] + } +} +``` From 054625978045139924f059c6e30da25de3e0394b Mon Sep 17 00:00:00 2001 From: Francesco-Voto Date: Wed, 12 Feb 2025 11:42:58 +0100 Subject: [PATCH 2/3] docs: update new documentation about app links with suggested changes --- docs/docs/introduction.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index d96c7c48..9fa3fce4 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -260,23 +260,23 @@ NOTE: When integrating with [React Navigation deep linking](https://reactnavigat #### App Links -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`: +If your your OAuth Redirect URL is an [App Links](https://developer.android.com/training/app-links), you need to add the following code to your `AndroidManifest.xml`: +```xml -``` - - - - - - - + android:name="net.openid.appauth.RedirectUriReceiverActivity" + android:exported="true"> + + + + + + + ``` -where the `host` is the domain of your redirect uri. +Replace `android:host` with the domain of your redirect uri. You need to add the `manifestPlaceholders` as described in the section above: From 717840d16140ddb683c845ce8bfb6b3c542b2b16 Mon Sep 17 00:00:00 2001 From: Francesco-Voto Date: Wed, 12 Feb 2025 12:12:51 +0100 Subject: [PATCH 3/3] docs: add better formatting to the app links section --- docs/docs/introduction.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index 9fa3fce4..fb0b17ff 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -260,9 +260,9 @@ NOTE: When integrating with [React Navigation deep linking](https://reactnavigat #### App Links -If your your OAuth Redirect URL is an [App Links](https://developer.android.com/training/app-links), you need to add the following code to your `AndroidManifest.xml`: -```xml +If your OAuth Redirect URL is an [App Links](https://developer.android.com/training/app-links), you need to add the following code to your `AndroidManifest.xml`: +```xml @@ -270,8 +270,7 @@ If your your OAuth Redirect URL is an [App Links](https://developer.android.com/ - + ```