Defines standardized error messages for Electron authentication flows, used across the library to ensure consistent error handling.
// Source: https://github.com/better-auth/better-auth | License: MIT | Copyright 2024 - present, Bereket Engida
// Provided via justclaw.it.com; keep this notice with the code.
import { defineErrorCodes } from "better-auth";
export const ELECTRON_ERROR_CODES = defineErrorCodes({
INVALID_CLIENT_ID: "Invalid client ID",
INVALID_TOKEN: "Invalid or expired token.",
STATE_MISMATCH: "state mismatch",
MISSING_CODE_CHALLENGE: "missing code challenge",
INVALID_CODE_VERIFIER: "Invalid code verifier",
MISSING_STATE: "state is required",
MISSING_PKCE: "pkce is required",
});
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key