Method CreateCredentialAsync
CreateCredentialAsync(string, CancellationToken)
Creates a passkey (a WebAuthn attestation).
Declaration
Task<PasskeyCredential> CreateCredentialAsync(string creationOptionsJson, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | creationOptionsJson | The creation options from the app's API, as WebAuthn JSON ( |
| CancellationToken | cancellationToken | A token to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<PasskeyCredential> | The new credential to post to the app's API, and whether the passkey was created on this device. |
Exceptions
| Type | Condition |
|---|---|
| PasskeyAuthenticatorException | The operation failed or the person cancelled it. Reason says why. |
| OperationCanceledException |
|