Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dagnelies committed Aug 21, 2023
1 parent d84259e commit a62f722
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
})
```

Expand Down Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@passwordless-id/webauthn",
"version": "1.2.5",
"version": "1.2.6",
"description": "A small wrapper around the webauthn protocol to make one's life easier.",
"type": "module",
"main": "dist/esm/index.js",
Expand Down

0 comments on commit a62f722

Please sign in to comment.