Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deeplinking scheme conflict on Android #611

Closed
badsyntax opened this issue Mar 12, 2021 · 4 comments · Fixed by #614
Closed

Deeplinking scheme conflict on Android #611

badsyntax opened this issue Mar 12, 2021 · 4 comments · Fixed by #614

Comments

@badsyntax
Copy link
Contributor

badsyntax commented Mar 12, 2021

Issue

Related to #494

I've added a detailed comment about the issue here: #494 (comment)

While this might not be seen as a "bug", I feel the documentation and Example should be updated to show how to integrate this library on Android with existing deeplinking integration already in place.

It would be great if:

  • The README was updated to mention how to handle auth redirect scheme, and existing deeplinking scheme on android
  • The Example was updated to show how to support auth redirect sheme and existing deeplinking scheme on android (preferably using https://reactnavigation.org/)

Environment

  • Your Identity Provider: Azure B2C
  • Platform that you're experiencing the issue on: Android
  • Are you using Expo? No
@pke
Copy link

pke commented Mar 16, 2021

I am also currently having the problem that the app will show a choice for the user after successful login.
Any hint in the readme how to combine deep linking and OAuth2 flow would be appreciated.

@masiddee
Copy link
Contributor

@badsyntax thanks for the additional details! We've update the READMEs to reflect this change when implementing into a project that uses React Navigation deep linking.

@badsyntax
Copy link
Contributor Author

awesome thanks @masiddee !

@JulianKingman
Copy link

JulianKingman commented Jul 28, 2021

I wasn't particularly happy with choosing a different scheme, so I found two different solutions:

  1. If you have a defined list of hosts (ie scheme://host), you can filter them using pathPattern. Unfortunately there's no exclusion filter, so you can only filter specific paths.
  2. You can create a custom deep link handler, I'm in the process of writing one myself. Most of the instructions are here: https://tech.justeattakeaway.com/2015/06/29/deep-linking-in-android-the-easy-way/, you also need to add app auth package to dependencies build.gradle (implementation 'net.openid:appauth:0.8.1', as of this comment), and import and call net.openid.appauth.RedirectUriReceiverActivity from the IntentHelper.java file.

Hopefully that's enough for anyone to figure out.

Edit: my ongoing saga to solve option 2: https://stackoverflow.com/questions/68590629/how-to-dispatch-intent-to-mainactivity-from-another-activity-react-native

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants