expo-auth-session not handling deep links
See original GitHub issueSummary
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
- Create a new expo app using the cli. Use the tabs template.
- Install expo-auth-session and expo-random;
- Following the guide, call
useAuthRequest
with the necessary parameters to log into a identityserver instance (you can probably use https://demo.identityserver.com/). - 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:
- Created 2 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
I have the same problem. Any help would be appreciated
@bruno-brant did you ever find a resolution to this?