0.2.2 • Published 10 months ago

@hyprjs/hypr-fido2-sdk v0.2.2

Weekly downloads
-
License
BSD 3-Clause
Repository
-
Last release
10 months ago

HYPR SDK for FIDO2 Browser

A small, no-dependencies SDK that provides utility functions to assist in interacting with the JavaScript WebAuthn API.

Requirements

You will need a relying party server to handle registering and authenticating a user via the SDK. For assistance with this, contact the HYPR Sales team.

Installation

ECMAScript module

npm install @hyprjs/hypr-fido2-sdk
import HYPRFido2Client from "@hyprjs/hypr-fido2-sdk";

Script Tag (jsDelivr CDN)

<script src="https://cdn.jsdelivr.net/npm/@hyprjs/hypr-fido2-sdk/dist/hyprfido2sdk.min.js"></script>

Script Tag (unpkg CDN)

<script src="https://unpkg.com/@hyprjs/hypr-fido2-sdk/dist/hyprfido2sdk.min.js"></script>

Usage

Register a User

// Create attestation options
const options = HYPRFido2Client.createAttestationOptions(...)

// Process options with RP server and get result
const result = fetch("/rp/server/url", { method: "POST", body: JSON.stringify(options) })

// Create credentials
HYPRFido2Client.createFido2Credential(result, () => {})

Authenticate a User

// Create assertion options
const options = HYPRFido2Client.createAssertionOptions(...)

// Process options with RP server and get result
const result = fetch("/rp/server/url", { method: "POST", body: JSON.stringify(options) })

// Use credentials
HYPRFido2Client.useFido2Credential(result, () => {})

Documentation

See HYPR SDK for FIDO2 Browser

0.2.1

10 months ago

0.2.0

10 months ago

0.2.2

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago