StaticfromA static factory method to create an AuthError from a fetch Response object. This is a utility that platform adapters can use for consistency.
The fetch Response object.
The parsed body of the response (can be JSON or text).
A new AuthError instance.
ReadonlystatusThe HTTP status code of the error response, if available.
ReadonlycodeThe error code returned by Auth0 (e.g., 'invalid_grant'), if available.
ReadonlyjsonThe full JSON response body of the error, if available.
ReadonlytypeA normalized error type that is consistent across platforms. This can be used for reliable error handling in application code.
Possible values:
INVALID_CREDENTIALS: Stored credentials are invalidNO_CREDENTIALS: No stored credentials foundNO_REFRESH_TOKEN: Refresh token is not availableRENEW_FAILED: Token renewal failedAPI_EXCHANGE_FAILED: API credentials exchange failed (MRRT)STORE_FAILED: Failed to store credentialsREVOKE_FAILED: Failed to revoke refresh tokenLARGE_MIN_TTL: Requested minimum TTL exceeds token lifetimeBIOMETRICS_FAILED: Biometric authentication failedINCOMPATIBLE_DEVICE: Device incompatible with secure storageCRYPTO_EXCEPTION: Cryptographic operation failedNO_NETWORK: Network errorAPI_ERROR: Generic API errorCREDENTIAL_MANAGER_ERROR: Generic credentials manager errorUNKNOWN_ERROR: Unknown error type
Represents an error that occurred during Credentials Manager operations.
This class wraps authentication errors related to credentials management functionality, including:
The
typeproperty provides a normalized, platform-agnostic error code that applications can use for consistent error handling across iOS, Android, and Web.Common Error Types:
Credentials Operations:
NO_CREDENTIALS: No stored credentials foundNO_REFRESH_TOKEN: Refresh token not available (ensure 'offline_access' scope was requested)INVALID_CREDENTIALS: Stored credentials are invalidRENEW_FAILED: Failed to refresh credentials using refresh tokenSTORE_FAILED: Failed to store credentialsREVOKE_FAILED: Failed to revoke refresh tokenLARGE_MIN_TTL: Requested minimum TTL exceeds token lifetimeAPI Credentials (MRRT):
API_EXCHANGE_FAILED: Failed to exchange refresh token for API-specific credentialsNetwork & API:
NO_NETWORK: Network connectivity issueAPI_ERROR: Generic API errorBiometric Authentication:
BIOMETRICS_FAILED: Biometric authentication failedINCOMPATIBLE_DEVICE: Device incompatible with secure storageCRYPTO_EXCEPTION: Cryptographic operation failedExample
Example
Example
See