The Expo SDK 51 version app can't get the login success response messages.
Checklist
- [X] The issue can be reproduced in the react-native-auth0 sample app (or N/A).
- [X] I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- [X] I have looked into the API documentation and have not found a suitable solution or answer.
- [X] I have searched the issues and have not found a suitable solution or answer.
- [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- [X] I agree to the terms within the Auth0 Code of Conduct.
Description
I want to quickly demo the Auth0 app in Expo SDK version 51. It can open the login page, but when I click the login button and return to the App, the result gives me the undefine value. I also use the eas commend build, which also gets the same issues.
The variable - credentials response is undefined.
const onLogin = async () => {
try {
await authorize();
let credentials = await getCredentials();
console.log(JSON.stringify(credentials))
Alert.alert('AccessToken: ' + credentials.accessToken);
} catch (e) {
console.log(e);
console.log(JSON.stringify(e))
}
};
Reproduction
- expo prebuild
- expo run:android
- Click the login button on the App.
- Input the email and password, then click the button.
Additional context
{ "name": "demoauth0", "version": "1.0.0", "scripts": { "start": "expo start --dev-client", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web" }, "dependencies": { "@expo/metro-runtime": "~3.2.1", "expo": "~51.0.7", "expo-status-bar": "~1.12.1", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.74.1", "react-native-auth0": "^3.2.1", "react-native-web": "~0.19.10", "expo-dev-client": "~4.0.14" }, "devDependencies": { "@babel/core": "^7.20.0" }, "private": true }
react-native-auth0 version
^3.2.1
React Native version
0.74.1
Expo version
~51.0.7
Platform
Android
Platform version(s)
Android emulator(Android Studio)
I believe I am also experiencing this issue but with Expo v50.0.7. I can see a via the auth0 logs that there has been a successful login but no auth code was exchanged
Also after upgrading to expo sdk 51, I noticed that seemingly randomly, the getCredentials() function would return undefined. I had to downgrade to expo sdk 50 for the time being until this is resolved.
Also after upgrading to expo sdk 51, I noticed that seemingly randomly, the
getCredentials()function would return undefined. I had to downgrade to expo sdk 50 for the time being until this is resolved.
This may be excellent news for solving this problem if I choose the Expo 50 SDK, but my project uses the Expo 51 SDK and has been running for a few months.
Is there any update on this?
@iamkhushbajwa appears to be resolved on my project, here are my dependencies and their versions:
"expo": "^51.0.22", "react-native": "0.74.3", "react-native-auth0": "^3.2.1",