Conversation
…ndle any unknown error during token refresh
|
Should runtime exceptions also be caught when doing a token exchange for SSO credentials? |
This is added to handle a specific use case when the customer is doing google auth and it crashes with NPE when doing token exchange for certain number of users . Both them and we are not able to reproduce this locally and the customer was also not able to handle this due the crash occuring on a background thread in the SDK. Hence added this check |
For all we know, it could also happen when doing a token exchange for SSO credentials; for example, by adding a custom claim (using an action) that the SDK doesn't know how to decode. We don't know for sure that it is exclusive to the code path for regular refresh token exchanges. Since we are now catching runtime exceptions in regular refresh token exchanges, it stands to reason to do the same in that one other place where we're performing that same request. |
Added to sso token exchange |
Changes
This PR adds a new error type
UNKNOWN_ERRORto the CredentialsManagerException class. This error is triggered during any unexpected error occurs when token refresh happens in the CredentialsManager classesTesting
This change adds unit test coverage
This change adds integration test coverage
This change has been tested on the latest version of the platform/language or why not
Checklist
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors