Practic Passkey - v1.0.0
    Preparing search index...

    Function passkeyErrorMessage

    • Explain why a passkey request stopped, in words a user can act on: a server refusal by its code, and the browser's own errors, in the labels given.

      Parameters

      • error: string | Error | DOMException

        What the browser, the library or the server threw; the library throws plain strings for malformed credentials.

      • errors: Record<
            | "invalid-request"
            | "unknown-app"
            | "origin-not-allowed"
            | "code-invalid"
            | "code-expired"
            | "not-allowed"
            | "challenge-expired"
            | "verification-failed"
            | "passkey-unknown"
            | "account-unknown"
            | "conflict"
            | "session-required"
            | "last-passkey"
            | "outbox-disabled"
            | "protocol-mismatch"
            | "server-error",
            string,
        > & {
            cancelled: string;
            exists: string;
            failed: string;
            insecure: string;
            "rate-limited": (retryAfter: number | undefined) => string;
        }

        The words for each failure.

        • cancelled: string

          The user cancelled the device's prompt, or it timed out.

        • exists: string

          The device already holds a passkey for the account.

        • failed: string

          Anything else.

        • insecure: string

          The page is not served over HTTPS or on localhost.

        • rate-limited: (retryAfter: number | undefined) => string

      Returns string