Skip to content

Commit 6d9008f

Browse files
committed
tweak to README and BUNDLERS guide, for clarification
1 parent cd1b751 commit 6d9008f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

BUNDLERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The plugins for Astro, Vite, and Webpack are included in the `bundler-plugins/`
2727

2828
**Note:** The [`ASN1` dependency](https://github.com/yoursunny/asn1.js) is [licensed under MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/), which is generally compatible with this library's [MIT license](LICENSE.txt). However, MPL 2.0 specifically requires preservation of the copyright/license header (block comment at top of `asn1.all.min.js`). To comply with this licensing requirement, ensure your tooling does not remove this comment from the bundle file.
2929

30-
### Astro Plugin
30+
### Astro Plugin (aka Integration)
3131

3232
If using Astro 4+, it's strongly suggested to import this library's Astro-plugin to manage the loading of its non-ESM dependencies. Add something like the following to your `astro.config.mjs` file:
3333

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The [**@lo-fi/webauthn-local-client** npm package](https://npmjs.com/package/@lo
3838
To check if `WebAuthn` API and functionality is supported on the device:
3939

4040
```js
41-
import { supportsWebAuthn } from "...";
41+
import { supportsWebAuthn } from "..";
4242

4343
if (supportsWebAuthn) {
4444
// welcome to the future, without passwords!
@@ -52,7 +52,7 @@ else {
5252
To check if [passkey autofill (aka "Conditional Mediation")](https://web.dev/articles/passkey-form-autofill) is supported on the device:
5353

5454
```js
55-
import { supportsConditionalMediation } from "...";
55+
import { supportsConditionalMediation } from "..";
5656

5757
if (supportsConditionalMediation) {
5858
// provide an <input> and UX for user to
@@ -72,7 +72,7 @@ else {
7272
To register a new credential in a `WebAuthn`-exposed authenticator, use `register()`:
7373

7474
```js
75-
import { regDefaults, register } from "...";
75+
import { regDefaults, register } from "..";
7676

7777
// optional:
7878
var regOptions = regDefaults({
@@ -141,7 +141,7 @@ Typically, though, [web applications *assume*](https://medium.com/webauthnworks/
141141
To authenticate (i.e., [perform an assertion](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API/Attestation_and_Assertion#assertion)) with an existing credential via a `WebAuthn`-exposed authenticator, use `auth()`:
142142

143143
```js
144-
import { authDefaults, auth } from "...";
144+
import { authDefaults, auth } from "..";
145145

146146
// optional:
147147
var authOptions = authDefaults({
@@ -176,7 +176,7 @@ Typical `auth()` configuration options:
176176
For certain UX flows, such as switching from the conditional-mediation to another authentication approach, you will need to cancel (via `signal`) a previous call to `auth()` before invoking an `auth()` call with different options. But calling `abort()` causes that pending `auth()` to throw an exception. To suppress this exception when resetting, pass the `resetAbortReason` value:
177177

178178
```js
179-
import { resetAbortReason, authDefaults, auth } from "...";
179+
import { resetAbortReason, authDefaults, auth } from "..";
180180

181181
var cancelToken = new AbortController();
182182
var authResult = await auth({ /* .. */ , signal: cancelToken.signal });
@@ -217,7 +217,7 @@ If `auth()` completes completes successfully, the return value (`authResult` abo
217217
To verify an authentication response (from `auth()`), use `verifyAuthResponse()`:
218218

219219
```js
220-
import { verifyAuthResponse, } from "...";
220+
import { verifyAuthResponse, } from "..";
221221

222222
var publicKey = ... // aka, regResult.response.publicKey
223223

@@ -234,7 +234,7 @@ You will need to have preserved `regResult.response.publicKey` (and likely `regR
234234
Further, if you used `packPublicKeyJSON()` on the original `publicKey` value to store/transmit it, you'll need to use `unpackPublicKeyJSON()` before passing it to `verifyAuthResponse()`:
235235

236236
```js
237-
import { verifyAuthResponse, unpackPublicKeyJSON } from "...";
237+
import { verifyAuthResponse, unpackPublicKeyJSON } from "..";
238238

239239
var packedPublicKey = ... // result from previous packPublicKeyJSON()
240240

0 commit comments

Comments
 (0)