-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
6 changed files
with
26 additions
and
16 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 |
---|---|---|
|
@@ -50,7 +50,7 @@ import * as webauthn from '@passwordless-id/webauthn' | |
|
||
```html | ||
<script type="module"> | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].0/dist/webauthn.min.js' | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].1/dist/webauthn.min.js' | ||
</script> | ||
``` | ||
### Import | ||
|
@@ -391,6 +391,10 @@ The following options are available for both `register` and `authenticate`. | |
- `'local'`: use the local device (using TouchID, FaceID, Windows Hello or PIN) | ||
- `'roaming'`: use a roaming device (security key or connected phone) | ||
- `'both'`: prompt the user to choose between local or roaming device. The UI and user interaction in this case is platform specific. | ||
- `domain`: by default, the current domain name is used. Also known as "relying party id". You may want to customize it for ... | ||
- a parent domain to let the credential work on all subdomains | ||
- browser extensions requiring specific IDs instead of domains ? | ||
- specific iframes use cases? | ||
- `debug`: If enabled, parses the "data" objects and provide it in a "debug" properties. | ||
|
||
|
||
|
@@ -400,17 +404,23 @@ Registration options | |
- `discoverable`: (`'discouraged'`, `'preferred'` or `'required'`) If the credential is "discoverable", it can be selected using `authenticate` without providing credential IDs. In that case, a native pop-up will appear for user selection. This may have an impact on the "passkeys" user experience and syncing behavior of the key. *(Default: 'preferred')* | ||
- `attestation`: If enabled, the device attestation and clientData will be provided as base64 encoded binary data. Note that this may impact the authenticator information available or the UX depending on the platform. *(Default: false)* | ||
- `userHandle`: The user "handle" (also known as user "id") can be used to re-register credentials for an existing user, thus overriding the current credential 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).* | ||
- `rp:{id:..., name: ...}`: By default the domain name is used as relying party ID and name. However, there are uses cases where you may want to customize it: | ||
- defining a parent domain to let the credential work on all subdomains | ||
- for browser extensions requiring specific IDs | ||
- for specific iframes use cases? | ||
|
||
|
||
Authentication options | ||
---------------------- | ||
|
||
- `mediation`: See https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#mediation | ||
|
||
|
||
Verification options | ||
-------------------- | ||
|
||
- `userVerified`: to ensure that the user has been verified by the authenticator | ||
- `counter`: this should be an incrementing value on each authentication, but it was made optional according to https://github.com/passwordless-id/webauthn/issues/38 | ||
- `domain`: in case you used a specific domain (relying party id) during registration/authentication, you need this too during verification | ||
- `verbose`: prints more details to the console if enabled | ||
|
||
|
||
Parsing data | ||
------------ | ||
|
||
|
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
|
||
|
||
<script type="module"> | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].0/dist/webauthn.min.js' | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].1/dist/webauthn.min.js' | ||
|
||
window.register = async function() { | ||
console.log('Registering...') | ||
|
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
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
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
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