ElyAuthException class
Exception thrown during Ely.by authentication operations
Contains specific error codes and messages to help diagnose authentication issues.
Common error codes:
invalid_client
- Invalid client ID or secretinvalid_grant
- Invalid authorization code or refresh tokenaccess_denied
- User denied access during OAuth flowBrowserLaunchFailed
- Cannot open browser for authenticationAuthTimeout
- User didn't complete authentication within timeoutStateMismatch
- OAuth state parameter validation failedTwoFactorRequired
- Account requires two-factor authentication
Example:
try {
final result = await ElyAuth.authenticateWithOAuth(config);
} catch (e) {
if (e is ElyAuthException) {
switch (e.error) {
case 'access_denied':
print('User cancelled authentication');
break;
case 'invalid_client':
print('Check your client ID and secret');
break;
default:
print('Authentication error: ${e.errorMessage}');
}
}
}
- Implemented types
Constructors
- ElyAuthException.new(String error, String errorMessage)
- Creates an authentication exception with error code and message
Properties
- error → String
-
Specific error code identifying the type of authentication failure
final
- errorMessage → String
-
Human-readable error message describing the failure
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited