forked from passwordless-id/webauthn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ import * as webauthn from '@passwordless-id/webauthn' | |
|
||
```html | ||
<script type="module"> | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].5/dist/webauthn.min.js' | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].6/dist/webauthn.min.js' | ||
</script> | ||
``` | ||
### Import | ||
|
@@ -131,11 +131,12 @@ import { client } from '@passwordless-id/webauthn' | |
|
||
const challenge = "a7c61ef9-dc23-4806-b486-2428938a547e" | ||
const registration = await client.register("Arnaud", challenge, { | ||
"authenticatorType": "auto", | ||
"userVerification": "required", | ||
"timeout": 60000, | ||
"attestation": false, | ||
"debug": false | ||
authenticatorType: "auto", | ||
userVerification: "required", | ||
timeout: 60000, | ||
attestation: false, | ||
userHandle: "recommended to set the to a random 64 bytes value", | ||
debug: false | ||
}) | ||
``` | ||
|
||
|
@@ -372,6 +373,7 @@ The following options are available for both `register` and `authenticate`. | |
- `'both'`: prompt the user to choose between local or roaming device. The UI and user interaction in this case is platform specific. | ||
- `attestation`: (Only for registration) If enabled, the device attestation and clientData will be provided as base64 encoded binary data. Note that this is not available on some platforms. *(Default: false)* | ||
- `debug`: If enabled, parses the "data" objects and provide it in a "debug" properties. | ||
- `userHandle`: (Only for registration) The `userHandle` can be used to re-register credentials for an existing user, thus overriding the current the key pair and username for that `userHandle`. *The default here is based on a hash of the `username`, and thus has some security implications as described in [issue](https://github.com/passwordless-id/webauthn/issues/29). For optimal security and privacy, it is recommended to set the `userHandle` to a random 64 bytes value.* | ||
- `mediation`: (Only for authentication) See https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#mediation | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters