Generate a new set of login data (including assertion challenge) to be sent to the browser.
User to start logging in.
Rest
...opts: ((cro) => PublicKeyCredentialRequestOptions)[]A list of functions which can modify the options that will be sent to the
browser for it to call
navigator.credentials.get()
.
A promise which resolves to the options which the browser should pass to
navigator.credentials.get()
and session data which the caller should store
securely for the duration of the registration ceremony.
Generate a new set of registration data (including attestation challenge) to be sent to the browser.
User to start registering.
Rest
...opts: ((cco) => PublicKeyCredentialCreationOptions)[]A list of functions which can modify the options that will be sent to the
browser for it to call
navigator.credentials.create()
.
A promise which resolves to the options which the browser should pass to
navigator.credentials.create()
and session data which the caller should store
securely for the duration of the registration ceremony.
Tell the Web Assembly code which is running the Go WebAuthn library for this instance to stop.
Don't call any more methods after you call this.
Optional
code: numberOptional code to stop the Web Assembly with.
A WebAuthn4JSEvents.exit event will be fired once the Web Assembly code exits.
If this parameter is non-zero (the default is zero), then a WebAuthn4JSEvents.error event will be fired before the WebAuthn4JSEvents.exit event.
Take the response from the browser and validate it against the user's credentials and the login ceremony's session data.
User to login.
Session data that was returned by a previous call to beginLogin.
Result from calling navigator.credentials.get()
in the browser.
Credential that was verified (against the challenge in the session data).
It's also checked to belong to the user's existing credentials.
Note that the caller is responsible for checking the Authenticator.cloneWarning property, indicating the credential has been cloned, and treating it as an error.
The caller should also use the Authenticator.signCount property to update the sign count it holds on record (for example in a database) for this credential. It can use the Credential.id property to identify credentials.
Take the response from the browser and verify the credential against the registration ceremony's session data.
User to register.
Session data that was returned by a previous call to beginRegistration.
Result from calling navigator.credentials.create()
in the browser.
Credential that was verified (against the challenge in the session data).
Note that the caller is responsible for associating this credential with the user (for example in a database) and for checking the same credential isn't registered to another user.
Generated using TypeDoc
Implements Web Authentication for applications. Uses the Go WebAuthn library, compiled to Web Assembly, to do the heavy lifting.
Note that WebAuthn4JS doesn't store any data itself. Users and credentials are left for the application to store, for example in a database.
No Inherit Doc