@firebase-web-authn/types
v10.4.2
Published
A Firebase Extension for authentication with WebAuthn passkeys.
Downloads
140
Readme
@firebase-web-authn/types
A Firebase Extension for authentication with WebAuthn passkeys.
This package contains types and interfaces used internally by FirebaseWebAuthn and for implementing it in a secure context.
WebAuthnUserCredential
Information about the public key credential associated with the user
import { WebAuthnUserCredential } from "@firebase-web-authn/types";
WebAuthnUserCredentialFactor
The authentication factor associated with the credential.
import { WebAuthnUserCredentialFactor } from "@firebase-web-authn/types";
type WebAuthnUserCredentialFactor = "first" | "second"
WebAuthnProcess
The WebAuthn process associated with operations and related cryptographic challenges.
import { WebAuthnProcess } from "@firebase-web-authn/types";
type WebAuthnProcess = "authentication" | "reauthentication" | "registration"
WebAuthnUserDocument
Document in the users
collection of the ext-firebase-web-authn
Firestore Database. This should not have read or write access from users.
import { WebAuthnUserDocument } from "@firebase-web-authn/types";
interface WebAuthnUserDocument {
"challenge"?: string; // Only present between operations and cleaned up if the user cancels.
"credentials"?: { // An object of "first" and "second" WebAuthnUserCredentials with either being null if not found.
[key in WebAuthnUserCredentialFactor]: WebAuthnUserCredential | null
};
"lastCredentialUsed"?: WebAuthnUserCredentialFactor; // The last credential successfully authenticated given as WebAuthnUserCredentialFactor.
"lastPresent"?: Timestamp; // Automatically updated on successful operations.
"lastVerified"?: Timestamp; // Automatically updated on successful operations that verified the user with biometrics.
"lastWebAuthnProcess"?: WebAuthnProcess; // The last WebAuthnProcess successfully completed by the user..
}