auth0/react-native-auth0

Cannot identify error when refreshToken fails by a revoked user

Desmond-SKY opened this issue · 0 comments

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