Description
Checklist
- The issue can be reproduced in the react-native-auth0 sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- 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)