question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deep linking issue on Android

See original GitHub issue

I believe I am running into an issue with linking on Android. It seems to be the #state=... portion that is throwing react-navigation off from picking up the link. Testing deeping linking works via CLI: npx uri-scheme open io.act.auth://CreateCheckin --android.

Heres is my linking config:

prefixes: ["io.act.auth://"],
config: {
  screens: {
   CreateCheckin: {
     path: "CreateCheckin"
    }
  }
}

Here is the redirect URI that react-navigation is trying to parse:

io.act.auth://CreateCheckin#state=978f7de7-42a1-424d-bacd-53a746c030ab&session_state=0436a428-d734-490f-a3bc-812712458efd&code=6627fcff-abac-4139-99b7-54ed2d2a9fee.0436a428-d734-490f-a3bc-812712458efd.011ac3f2-b54f-419d-8108-6b1b67bd3f12

What would be the proper config to match the #state... portion?

_Originally posted by @joe307bad in https://github.com/react-keycloak/react-native-keycloak/issues/27#issuecomment-857341555_

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
oneil-marcelocommented, Jun 9, 2021

Excellent, congratulations @joe307bad !

0reactions
joe307badcommented, Jun 9, 2021

Thanks a ton @oneil-marcelo, I did get it working it seems.

I added this as my valid redirect URI in keycloak:

io.act.auth://io.act.host/CreateCheckin/*

Then I had this as my ReactNativeKeycloakProvider:

<ReactNativeKeycloakProvider
      authClient={keycloak}
      initOptions={{
        redirectUri: 'io.act.auth://io.act.host/CreateCheckin/'
      }}
    >
      <Root.make />
</ReactNativeKeycloakProvider>

And then finally my linking config:

linking: {
    prefixes: ["io.act.auth://io.act.host/"],
    config: { screens: { CreateCheckin: "CreateCheckin/:id" } } 
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Your Deep Links Might Be Broken: Web Intents and Android 12
Get ahead of the behavior changes in the latest Android 12 update by fixing deep links with web intents in this guide.
Read more >
android - Deep-linking intent does not work - Stack Overflow
After I created another separate activity and put intent filter there, it solved the problem. Hope this can help others who are facing...
Read more >
Create Deep Links to App Content - Android Developers
To allow users to enter your app from links, you must add intent filters for the relevant activities in your app manifest. These...
Read more >
Anyone else experience completely broken deep links on ...
Anyone else experience completely broken deep links on Android 12? · Test that your domain is verified, according to the `assetlinks. · Make...
Read more >
Deep Links Crash Course : Part 3 Troubleshooting ... - Medium
Symptom 1: The Links Never Work ... If users are clicking on links and they aren't opening in your application, then there might...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found