react-native-auth0
react-native-auth0 copied to clipboard
Cannot identify error when refreshToken fails by a revoked user
Checklist
- [X] The issue can be reproduced in the react-native-auth0 sample app (or N/A).
- [X] I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- [X] I have looked into the API documentation 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
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
getCredentialsfromuseAuth0, orcredentialsManager.getCredentialsto 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