Cannot identify error when refreshToken fails by a revoked user
Desmond-SKY opened this issue · 0 comments
Desmond-SKY commented
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
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
- Login and save credentials.
- Revoke the refreshToken from auth0 dashboard.
- Use
getCredentials
fromuseAuth0
, orcredentialsManager.getCredentials
to get token when the existing accessToken expired. - 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