react-native-auth0 icon indicating copy to clipboard operation
react-native-auth0 copied to clipboard

The Expo SDK 51 version app can't get the login success response messages.

Open davidlin1568 opened this issue 1 year ago • 3 comments

Checklist

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))
    }
  };

image

Reproduction

  1. expo prebuild
  2. expo run:android
  3. Click the login button on the App.
  4. 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)

davidlin1568 avatar May 21 '24 07:05 davidlin1568

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

ap752-unikent avatar May 30 '24 08:05 ap752-unikent

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.

benny-conn avatar Jun 26 '24 01:06 benny-conn

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.

davidlin1568 avatar Jun 26 '24 09:06 davidlin1568

Is there any update on this?

iamkhushbajwa avatar Oct 06 '24 23:10 iamkhushbajwa

@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",

ap752-unikent avatar Oct 07 '24 10:10 ap752-unikent