@firebase-web-authn/types
TypeScript icon, indicating that this package has built-in type declarations

10.4.2 • Public • Published

@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.

FirebaseWebAuthn version Firebase Admin SDK version

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..
}

More packages

Readme

Keywords

none

Package Sidebar

Install

npm i @firebase-web-authn/types

Weekly Downloads

3

Version

10.4.2

License

Apache-2.0

Unpacked Size

18.7 kB

Total Files

23

Last publish

Collaborators

  • gavinsawyer