react-native-auth0: Stuck at log in after entering credentials on Android, doesn't redirect back or log me in
Describe the problem
Issues with loggin in with an android device / simulator. After entering the credentials in the browser that appears, I press “Continue” and I see in the top of my browser that it tries to load the request but stops loading after about one second and then nothing happens. Nothing happens if I press the “Continue”-button either.
But this only happens when I enter the correct credentials. If I enter the wrong ones on purpose, it will give me an error that its wrong.
And when I press back/exit the browser to return to the app to try again, the browser just stays blank. Nothing happens and I can’t trigger anything.
This ONLY happens on android, iOS works just fine.
What was the expected behavior?
Be able to log in without issue on android. After I’ve put in credentials and pressed “Continue”, it should redirect me back to app and I should be logged in.
Reproduction
Set up a new expo project with Typescript and the latest SDK.
Add react-native-auth0 & @types/react-native-auth0.
Copy the example code detailed here for example https://github.com/auth0-samples/auth0-react-native-sample/tree/master/00-Login-Expo
Environment
react-native-auth0@2.17.1 @types/react-native-auth0@2.14.1 react-native@0.71.4 expo@48.0.9
react-native info:
System:
OS: macOS 13.2.1
CPU: (8) arm64 Apple M1
Memory: 129.78 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
Watchman: 2022.08.22.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 23, 26, 28, 29, 30, 31, 33
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0
System Images: android-31 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Please let me know if there’s any other information I can provide.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (12 by maintainers)
Alright so figured out that it’s related to my package name not being all in lowercase. My package name (just an example): com.company.Appname when it should’ve been just com.company.appname.
When I change the package name locally to lowercase and whitelist the lowercase version, it works. But I can’t do that since the existing users have an app out that its based on “Appname” and that is working with an older version of auth0.
It seems that the package has issues trying to redirect me back to the app since package names isn’t matching.
Recently updated react-native-auth0 to version 4.0.0 from 2.17.1 and react-native from 0.71.2 to 0.74.
Now when I am trying to login to application using universal login, it is able to get login success log at auth0 logs. But in reality the login is not redirecting back to app.
Help is highly appreciated as it is blocking us for production deployment.
If you need any additional info please let me know.
Can you reopen the issue ?
Hi @poovamraj and thanks again.
Sorry to say that this didn’t change anything, the same issue still persists. I believe that @KMathisGit posted some interesting thoughts in the link above which might be worth looking into