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

00-login-expo - Fails after authorising: TypeError: Cannot read property 'accessToken' of undefined. No Credentials were previously set.

Open winterstein opened this issue 1 year ago • 2 comments

Checklist

  • [X] I have looked into the Readme (Base/Hooks/Expo) 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

After login, there's no access to the user info. The code outputs an error.

The first time, login goes through an authorisation process (e.g. auth via Google). It then returns to the app screen -- which still shows a Log In button. There is also now an error message: No Credentials were previously set

Here is the log output from npx expo run:android:

Opening com.auth0samples://expo-development-client/?url=http%3A%2F%2F192.168.178.21%3A8081 on XQ_AS52 › Logs for your project will appear below. Press Ctrl+C to exit. Android Bundling complete 831ms LOG [TypeError: Cannot read property 'accessToken' of undefined]

This is with the code as downloaded from the Auth0 dashboard.

I have removed Expo Go from my phone to ensure that Expo Go is not being used. This is an expo development build.

Reproduction

  1. Download a version of 00-login-expo from the Auth0 dashboard, with the project settings in place.
  2. Follow the install instructions https://github.com/auth0-samples/auth0-react-native-sample/tree/master/00-Login-Expo
  3. Deploy to a local android phone
  4. Try to login...
  5. ...Stuck. The expo log says: LOG [TypeError: Cannot read property 'accessToken' of undefined]

The issue can be reproduced consistently.

Additional context

Computer: Linux Mint

npx expo --version 0.7.3

adb --version Android Debug Bridge version 1.0.41 Version 35.0.1-11580240 Installed as /home/daniel/Android/Sdk/platform-tools/adb Running on Linux 6.8.0-40-generic (x86_64)

Phone: Sony Xperia V, running Android v12

Sample

Expo

Platform

Android

Platform version(s)

12

winterstein avatar Aug 19 '24 09:08 winterstein

i am also facing same issue how can we resolve the issue could anyone reply for this issue

janakiramguduri avatar Dec 20 '24 11:12 janakiramguduri

Can we get som response on this? I also have issues with this and i think i did setup correctly.

martinnovak22 avatar Jan 10 '25 11:01 martinnovak22