Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: add new auth error codes (#30708)

Joel Lee2669e3df4be7
diff --git a/apps/docs/components/MDX/auth_error_codes_table.mdx b/apps/docs/components/MDX/auth_error_codes_table.mdx
index fe20ab0da47..a4d83d30b3a 100644
--- a/apps/docs/components/MDX/auth_error_codes_table.mdx
+++ b/apps/docs/components/MDX/auth_error_codes_table.mdx
@@ -17,6 +17,7 @@ To supplement HTTP status codes, Supabase Auth returns a string error code which
| `email_provider_disabled` | Signups are disabled for email and password. |
| `flow_state_expired` | PKCE flow state to which the API request relates has expired. Ask the user to sign in again. |
| `flow_state_not_found` | PKCE flow state to which the API request relates no longer exists. Flow states expire after a while and are progressively cleaned up, which can cause this error. Retried requests can cause this error, as the previous request likely destroyed the flow state. Ask the user to sign in again. |
+| `hook_payload_invalid_content_type` | Payload from Auth does not have a valid Content-Type header. |
| `hook_payload_over_size_limit` | Payload from Auth exceeds maximum size limit. |
| `hook_timeout` | Unable to reach hook within maximum time allocated. |
| `hook_timeout_after_retry` | Unable to reach hook after maximum number of retries. |
@@ -30,13 +31,15 @@ To supplement HTTP status codes, Supabase Auth returns a string error code which
| `mfa_factor_name_conflict` | MFA factors for a single user should not have the same friendly name. |
| `mfa_factor_not_found` | MFA factor no longer exists. |
| `mfa_ip_address_mismatch` | The enrollment process for MFA factors must begin and end with the same IP address. |
+| `mfa_phone_enroll_not_enabled` | Enrollment of MFA Phone factors is disabled. |
+| `mfa_phone_verify_not_enabled` | Login via Phone factors and verification of new Phone factors is disabled. |
+| `mfa_totp_enroll_not_enabled` | Enrollment of MFA TOTP factors is disabled. |
+| `mfa_totp_verify_not_enabled` | Login via TOTP factors and verification of new TOTP factors is disabled. |
| `mfa_verification_failed` | MFA challenge could not be verified -- wrong TOTP code. |
| `mfa_verification_rejected` | Further MFA verification is rejected. Only returned if the [MFA verification attempt hook](https://supabase.com/docs/guides/auth/auth-hooks?language=add-admin-role#hook-mfa-verification-attempt) returns a reject decision. |
| `mfa_verified_factor_exists` | Verified phone factor already exists for a user. Unenroll existing verified phone factor to continue. |
-| `mfa_totp_enroll_disabled` | Enrollment of MFA TOTP factors is disabled. |
-| `mfa_totp_verify_disabled` | Login via TOTP factors and verification of new TOTP factors is disabled. |
-| `mfa_phone_enroll_disabled` | Enrollment of MFA Phone factors is disabled. |
-| `mfa_phone_verify_disabled` | Login via Phone factors and verification of new Phone factors is disabled. |
+| `mfa_web_authn_enroll_not_enabled` | Enrollment of MFA Web Authn factors is disabled. |
+| `mfa_web_authn_verify_not_enabled` | Login via WebAuthn factors and verification of new WebAuthn factors is disabled. |
| `no_authorization` | This HTTP request requires an `Authorization` header, which is not provided. |
| `not_admin` | User accessing the API is not admin, i.e. the JWT does not contain a `role` claim that identifies them as an admin of the Auth server. |
| `oauth_provider_not_supported` | Using an OAuth provider which is disabled on the Auth server. |