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.

AuthSession fails to redirect back to Android Standalone app

See original GitHub issue

Doing an auth session on an android standalone app does not redirect back to the app. I have defined my scheme in app.json. On an iOS standalone auth session works perfectly fine.

It is also worth noting that I’ve tried detaching but then I encountered this exact same issue: https://github.com/expo/expo/issues/880. This issue might be related to that but I’m creating this issue in case this is a different one.

I’m hoping you could add this fix for SDK 27 as this auth session is an important aspect of our app!

Environment

Environment: OS: macOS High Sierra 10.13.4 Node: 6.11.0 Yarn: Not Found npm: 3.10.10 Watchman: 4.7.0 Xcode: Xcode 9.3 Build version 9E145 Android Studio: 3.1 AI-173.4670197

Packages: (wanted => installed) expo: ^26.0.0 => 26.0.0 react: 16.3.0-alpha.1 => 16.3.0-alpha.1 react-native: https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz => 0.54.2

Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/nupixo-122d8e85-2632-435a-a67b-1638914677ab.tar.gz

Steps to Reproduce

  1. Fork this repo: https://github.com/expo/auth0-example
  2. Make sure you have Auth0 client set up
  3. Make sure you define a scheme in app.json
  4. Change the redirect url to the defined scheme in app.json
  5. exp build:android
  6. Once installed, open the app
  7. Login with Auth0, a browser should open and an auth session should initiate
  8. Sign in with valid credentials

Expected Behavior

User gets successfully authenticated. AuthSession browser window will get closed and redirect back to the app.

Actual Behavior

Browser window does not get closed and does not redirect back to the app.

Reproducible Demo

A good reproducible demo is expo’s own example: https://github.com/expo/auth0-example but try building an android standalone apk

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
nikojohnarellanocommented, Apr 27, 2018

Hi @esamelson @brentvatne seems like this is still not fixed. I tried this with the same steps above but still it doesn’t redirect back successfully. Can this issue be re-opened please thanks!

0reactions
nikojohnarellanocommented, Aug 10, 2018

@felipefs93 The work around that I did was to just implement the WebBrowser redirect manually. Pretty much the same thing here: https://github.com/expo/examples/blob/master/with-webbrowser-redirect/app/App.js

But the last time I checked this AuthSession issue I have was never resolved. Not sure for others

Read more comments on GitHub >

github_iconTop Results From Across the Web

AuthSession doesn't redirect back to Android standalone app ...
Doing an auth session on an android standalone app does not redirect back to the app. I have defined my scheme in app.json....
Read more >
Android Expo client: AuthSession fails to redirect back to app after ...
I can auth successfully in the iOS Expo client, iOS standalone and Android standalone. When loading my app in the Android expo client,...
Read more >
expo-auth-session - Two app options on return to app
This doesnt work for me, when I do I get the redirect but without any data and if I put the package name...
Read more >
Expo Auth Session for Google Authentication on React Native ...
I will also show you what the code should look like when it is fixed for Android standalone apps in the future, and...
Read more >
Sign users in to your mobile app using the redirect model
Note: The Okta CLI can create a Kotlin app for Android that's pre-configured ... To achieve this you need to define how Okta...
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