Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot identify error when refreshToken fails by a revoked user #916

Closed
6 tasks done
Desmond-SKY opened this issue Jun 5, 2024 · 2 comments
Closed
6 tasks done
Labels
bug This points to a verified bug in the code

Comments

@Desmond-SKY
Copy link

Checklist

Description

We need to force user logout when revoking a user, but it's impossible to identify the reason from const { error } = useAuth0. As error always shows [Error: An error occurred while trying to use the Refresh Token to renew the Credentials.] whenever refresh token fails, no matter it's caused by network issue or user is revoked.

Reproduction

  1. Login and save credentials.
  2. Revoke the refreshToken from auth0 dashboard.
  3. Use getCredentials from useAuth0, or credentialsManager.getCredentials to get token when the existing accessToken expired.
  4. The error will always show An error occurred while trying to use the Refresh Token to renew the Credentials.

Additional context

No response

react-native-auth0 version

3.1.0

React Native version

0.68.4

Expo version

No response

Platform

Android, iOS

Platform version(s)

Any

@Desmond-SKY Desmond-SKY added the bug This points to a verified bug in the code label Jun 5, 2024
@poovamraj
Copy link
Contributor

@Desmond-SKY, @kailash-b has upgraded the underlying Android SDK which will fix this issue for you. Now network errors are tracked differently - #1047

Can you confirm that this works to fix the issue you are facing?

@kailash-b
Copy link
Contributor

@Desmond-SKY
We tried the use case with the latest version of the SDK.
We are able to distinguish between the errors as below :

Android :
Image
Image
iOS :
Image
Image

Closing this issue for now. Feel free to re-open in the future if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

3 participants