Google.logInAsync using the web behavior never returns in detached android app. The account selection web page do show up but nothing happens after picking an account.
Works fine on detached iOS app.
I’ve follow the steps to set it up for standalone app and it works before detach. Is there any other configurations required for the google login to work in detached android app?
I assume the scheme is for the login web to redirect back to my app?
But the current behavior is that the account selection web page do show up, after picking an account the web page do close itself (returns to my app), but nothing happens.
@janic I found the YOUR_APP_SCHEME in app.json under exp.detach.scheme and add the stuff in AndroidManifest.xml and then run react-native run-android, got:
FAILURE: Build failed with an exception.
* What went wrong:
Cannot read packageName from /Users/philipchen/repos/md-mobile/android/app/src/main/AndroidManifest.xml
There’s a fatal error saying tools of tools.node is not connected.
But even after that the Google login was not working and after hours of searching I came across the instructions in the AppAuth repo (which I believe what Expo uses internally) - https://github.com/openid/AppAuth-Android
The solution is to use the app’s reverse url scheme in AndroidManifest.xml so that the final working code that needs to be added there is
In the above code replace com.example.app with your own app’s reverse url scheme
@janic Please update the Expo docs as soon as possible with this info so that it saves everyone the hassle of searching for hours to solve these issues.
Hey @cosmocoder, @philip_mvpfastlane - did you all ever figure out a solution for this that involved other items in the AndroidManifest.xml?
I am using https://github.com/FormidableLabs/react-native-app-auth as well, and setting it up the exact same way, but the authorize() call never returns on Android after I finalize the login. I can’t help but thinking that the Expo activity, perhaps even the one that provides the menu button or the “shake to view menu” in development mode, is capturing the intent?