Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,19 @@ class CredentialsManagerException extends Auth0Exception {

return CredentialsManagerException(e.code, e.messageString, errorDetails);
}

bool get isTokenRenewFailed =>
code == 'RENEW_FAILED' ||
code ==
'''
An error occurred while trying to use the Refresh Token to renew the Credentials.''';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need a proper error code on the Android side as well.


bool get isNoCredentialsFound =>
code == 'NO_CREDENTIALS' || code == 'No Credentials were previously set.';

bool get isNoRefreshTokenFound =>
code == 'NO_REFRESH_TOKEN' ||
code ==
'''
Credentials need to be renewed but no Refresh Token is available to renew them.''';
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ class WebAuthenticationException extends Auth0Exception {

WebAuthenticationException.fromPlatformException(final PlatformException e)
: this(e.code, e.messageString, e.detailsMap);

bool get isUserCancelledException =>
code == 'USER_CANCELLED' || code == 'a0.authentication_canceled';
}
Loading