I’ve been following the React Native quick start guide, however, I can’t get the universal login flow to work. Lots of weird stuff happening and I don’t know if I’ve setup everything correctly. The flow goes like this:
I click my login button which calls authorize() and opens the universal login flow in the browser.
Then I click login through Google, I input my username and password but once I submit, Google just keeps “loading” and I don’t get redirected to my application.
Because I’m blocked by the infinite loading, I either go back or kill the app.
When I click the login button again, a blank screen opens but this time it’s not in the browser. I can’t do anything inside this screen and the only way I can get back to step one, is to clear device cache and install my application on it again.
It seems like I’ve setup Auth0 correctly since I have access to the hook and it’s functionality, however, I can’t get pass the login screen. What also confuses me is that after the initial login button click, the flow doesn’t open in a browser and instead it somehow opens in app, even though the screen is blank and white.
I also see a “Success Login” log in the monitoring tab.
Anyone have any idea why this might be happening? I have iOS working just fine.
It sounds like you are authenticating successfully with Auth0, but the callback isn’t being handled properly. Can you check your Callback URLs and handlers are correctly configured?
The second login ‘white screen’ might be a refresh token session that doesn’t require any user interaction.
Also, can you share some more implementation details, i.e. code snippets?
First of all I would like to thank you for the answer. I kinda figured out what was going on and now I am trying to figure out how to handle the issue.
So the problem was that my Android application ID contains capital letters and looks something like this com.example.exampleApp. For whatever reason, if the applicationId has a capital letter the invoked callback does not work. I confirmed that this is the issue by changing my application ID to contain only lowercase letters - com.example.exampleapp. By changing the application ID the flow started working just fine.
Now this isn’t really a fix since in reality I can’t actually change the application ID of the application, so I need to figure out how to make it work even if the application ID contains capital letters.
The issue is easily reproducible by creating a fresh React Native project, changing the Android application ID to contain capital letters and running react-native-auth0.