Auth0 doesn't work on React Native

Hello. I want to integrate Auth0 to react native application. I installed react-native-auth0 and passed all steps from quickstart guide https://manage.auth0.com/dashboard/eu/sleepschool/applications/ylbvtOC54yfXdFcwA9EVMhUZHum468SO/quickstart
But it doesn’t work.
On android neigther login with google and logout doesn’t work. Sometimes I see auth0 page, but when I click on sign in with google button it closes and I redirected back to the app. User object is equal null always. But most of time I do not even see auth0 page, I see error in console error:', { [TypeError: Network request failed] line: 103, column: 8201, sourceURL: ‘index.android.bundle’ }

On IOS, most of time I see error Safari cannot open the page because the address is invalid
But sometimes I see auth0 page and can login with google and get user object. But after that, I can’t logout. I see the same safari error.

“react”: “18.1.0”,
“react-native”: “0.70.3”,
“react-native-auth0”: “^2.17.4”,

I tested from android device and it works, both login with google and logout. But it doesn’t work on simulators
Can I fix that somehow?
I do not have IOS device, so I can’t know if that work on IOS device at all.

Hey there Anna, welcome to Auth0!

First of all, it’s great to hear you successfully tested the SDK with your Android device!

Can you please let me know which quickstart did you follow (the link you’ve sent to us doesn’t bring me to any specific quickstart, unfortunately):

  1. Is this a beta quick start or this one?

Also, let’s try to separate issues with simulators, react native SDK and the react-native-auth0 SDK itself.

To address the bundle issues, can you please try these:
In your app root:

  1. npm start --reset-cache

and / or:

  1. yarn run ios or yarn run android

Please let me know if that helped or reach out with result! Thanks!
At the bottom of this page, there are a couple of useful links on where and how to report issues with react-native-auth0 SDK directly to its owners.

1 Like

Hello. Thanks for your answer.
I’ve tried your solutions, it doesn’t help.
And I tested from IOS device and login with google works, but sign out doesn’t. I think it works somehow, because until I do signout, it prevents me to signin again.
But after I do signout I see safary error page.
Regards, Anna.

1 Like

@marcelina.barycka It seems the call in React Native to clear the session does not work. Do you have a solution? Safari says it cannot open the URL. I don’t think what you posted is a solution given that the example app doesn’t work and the beta quick start fails on logout.

It might be essential if the issues happens on simulators or real devices. It looks like what happened in case of the android simulator has not been the issue for a real android device. The suggested tips are a basic troubleshooting and if it still doesn’t work for the simulator in use, then it’s hard to tell what’s the issue and to bring a solution - it could be a good idea to reach out to a community that helps with the work environment in question.

Another thing you can do is to bring your observations indicating where the issue occurs (simulators a real device?) by visiting this page, at the bottom there are a couple of useful links on where and how to report issues with react-native-auth0 SDK directly to its owners.

I found an issue on github with the same problem and it was not resolved.
Many people have the same problem and it is known issue but still not resolved.
Do you have any other recommendations to solve this problem?

Do you have any other recommendations to solve this problem?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.