Skip to content

zero-auth API Documentation v1.2.0


zero-auth API Documentation / AUTH_ERROR_CODES

Variable: AUTH_ERROR_CODES

const AUTH_ERROR_CODES: object

Defined in: src/errors/authErrors.ts:3

Type Declaration

AUTH_CSRF_INVALID

readonly AUTH_CSRF_INVALID: "AUTH_CSRF_INVALID" = "AUTH_CSRF_INVALID"

The request is missing or has an invalid CSRF token (403).

AUTH_FORBIDDEN

readonly AUTH_FORBIDDEN: "AUTH_FORBIDDEN" = "AUTH_FORBIDDEN"

The user is authenticated but lacks the required role/permission (403).

AUTH_TOKEN_EXPIRED

readonly AUTH_TOKEN_EXPIRED: "AUTH_TOKEN_EXPIRED" = "AUTH_TOKEN_EXPIRED"

The token has expired.

AUTH_TOKEN_INVALID

readonly AUTH_TOKEN_INVALID: "AUTH_TOKEN_INVALID" = "AUTH_TOKEN_INVALID"

The token signature is invalid or the token is malformed.

AUTH_TOKEN_MISSING

readonly AUTH_TOKEN_MISSING: "AUTH_TOKEN_MISSING" = "AUTH_TOKEN_MISSING"

No token was found in the request (missing Authorization header or cookie).

AUTH_UNAUTHORIZED

readonly AUTH_UNAUTHORIZED: "AUTH_UNAUTHORIZED" = "AUTH_UNAUTHORIZED"

The user is not authenticated (generic 401).