UNPKG

better-auth

Version:

The most comprehensive authentication framework for TypeScript.

20 lines (19 loc) 1 kB
import { defineErrorCodes } from "@better-auth/core/utils/error-codes"; //#region src/plugins/device-authorization/error-codes.ts const DEVICE_AUTHORIZATION_ERROR_CODES = defineErrorCodes({ INVALID_DEVICE_CODE: "Invalid device code", EXPIRED_DEVICE_CODE: "Device code has expired", EXPIRED_USER_CODE: "User code has expired", AUTHORIZATION_PENDING: "Authorization pending", ACCESS_DENIED: "Access denied", INVALID_USER_CODE: "Invalid user code", DEVICE_CODE_ALREADY_PROCESSED: "Device code already processed", DEVICE_CODE_NOT_CLAIMED: "Device code has not been claimed by a verifying session; call `GET /device` with the `user_code` while signed in before approving or denying", POLLING_TOO_FREQUENTLY: "Polling too frequently", USER_NOT_FOUND: "User not found", FAILED_TO_CREATE_SESSION: "Failed to create session", INVALID_DEVICE_CODE_STATUS: "Invalid device code status", AUTHENTICATION_REQUIRED: "Authentication required" }); //#endregion export { DEVICE_AUTHORIZATION_ERROR_CODES };