Skip to content

Commit

Permalink
TIQR-475: Fix deeplinking issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dzolnai committed Nov 21, 2024
1 parent 661c06e commit b003c4f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
20 changes: 20 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,30 @@
android:path="/client/mobile/external-account-linked-error"
android:scheme="https" />
</intent-filter>

<!-- External account linking success -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="*.eduid.nl"
android:scheme="https"
android:path="/client/mobile/external-account-linked"
tools:ignore="IntentFilterUniqueDataAttributes" />
<data
android:scheme="eduid"
android:host="*"
android:path="/client/mobile/external-account-linked"
tools:ignore="IntentFilterUniqueDataAttributes" />
</intent-filter>
</activity>

<activity
android:name="net.openid.appauth.RedirectUriReceiverActivity"
tools:node="replace"
android:exported="true">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/kotlin/nl/eduid/graphs/MainGraph.kt
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,13 @@ fun MainGraph(
route = AccountLinked.routeWithArgs,
deepLinks = listOf(
navDeepLink {
uriPattern = AccountLinked.getUriPatternOK(baseUrl)
uriPattern = AccountLinked.getUriPatternInternalLinkOK(baseUrl)
},
navDeepLink {
uriPattern = AccountLinked.getUriPatternExternalLinkOK(baseUrl)
},
navDeepLink {
uriPattern = AccountLinked.getUriPatternExternalLinkOKCustomScheme()
},
navDeepLink {
uriPattern = AccountLinked.getUriPatternFailed(baseUrl)
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/kotlin/nl/eduid/graphs/Routes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ object RequestEduIdCreated {

object AccountLinked {
const val route = "account_linked"
fun getUriPatternOK(baseUrl: String) = "$baseUrl/client/mobile/account-linked"
fun getUriPatternInternalLinkOK(baseUrl: String) = "$baseUrl/client/mobile/account-linked"
fun getUriPatternExternalLinkOK(baseUrl: String) = "$baseUrl/client/mobile/external-account-linked"
fun getUriPatternExternalLinkOKCustomScheme() = "eduid:///client/mobile/external-account-linked"
fun getUriPatternFailed(baseUrl: String) = "$baseUrl/client/mobile/eppn-already-linked"
fun getUriPatternExpired(baseUrl: String) = "$baseUrl/client/mobile/expired"

Expand Down

0 comments on commit b003c4f

Please sign in to comment.