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.

expo-auth-session not handling deep links

See original GitHub issue

Summary

I’m creating an expo application that must authenticate with IdentityServer4. I’ve triple checked the documentation and it seems I’ve followed every step; however, AuthSession isn’t handling the redirect correctly - in fact, React Navigation handles the link and shows a not found screen (that is there from the tabs template).

Now, I’m not completely sure whether the deep link (exp://192.168.15.15:19000/--/expo-auth-session?code=F89B4EA9074AE3127DFF9C06143305929B6A737390D31CB2EC7D6AF126DE093A&scope=openid+profile+offline_access&state=GlIRZoqYw9&session_state=gydz3ihHaRYxX5CrsLOrXGrJ_hANwBWNWPhLWt8nlKg.2E96C1DFEB201803ED9A6D2B7BE92701) was supposed to be handled by auth-session directly or if something is missing in the docs and I’m the one supposed to handle it manually, but it seems confusing - more so when I realized that promptAsync returns all data and therefore no redirect was necessary.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android

SDK Version (managed workflow only)

42.0.1

Environment

Expo CLI 4.8.1 environment info: System: OS: Windows 10 10.0.19043 Binaries: Node: 16.3.0 - C:\Aplic\nodejs\node.EXE npm: 7.15.1 - C:\Aplic\nodejs\npm.CMD npmPackages: expo: ~42.0.1 => 42.0.3 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2 react-native-web: ~0.13.12 => 0.13.18 Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

  1. Create a new expo app using the cli. Use the tabs template.
  2. Install expo-auth-session and expo-random;
  3. Following the guide, call useAuthRequest with the necessary parameters to log into a identityserver instance (you can probably use https://demo.identityserver.com/).
  4. After the browser is opened and you enter the credentials, the app suffers a redirect, but React Navigation will show the Not Found page.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
felix-lambertcommented, Jan 27, 2022

I have the same problem. Any help would be appreciated

0reactions
bmardencommented, Oct 24, 2022

@bruno-brant did you ever find a resolution to this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AuthSession - Expo Documentation
AuthSession. AuthSession is the easiest way to add web browser based authentication (for example, browser-based OAuth flows) to your app, built on top...
Read more >
Expo AuthSession new window not redirecting on Web
There is a warning in the AuthSession Expo Docs about this case: In order to close the popup window on web, you need...
Read more >
#1 Intro to Deep Linking | Expo Deep linking Series - YouTube
What is deep linking and how to use the linking module in Expo to create deep links into your react native app.
Read more >
expo-auth-session - npm
Configuration. To use this module, you need to set up React Native deep linking in your application. For more information, check out React ......
Read more >
Use expo-auth-session with Facebook the Easiest Way on iOS ...
As the OAUth2 authentication APIs for Facebook and Google are now deprecated, Expo invites us to use the new Web Browser-based implementation ...
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