Skip to content

WebAuthnP256.getCredentialRequestOptions

Returns the request options to sign a challenge with the Web Authentication API.

Imports

Named
import { WebAuthnP256 } from 'ox'

Examples

import { WebAuthnP256 } from 'ox'
 
const options = WebAuthnP256.getCredentialRequestOptions({
  challenge: '0xdeadbeef',
})
 
const credential = await window.navigator.credentials.get(options)

Definition

function getCredentialRequestOptions(
  options: getCredentialRequestOptions.Options,
): internal.CredentialRequestOptions

Source: src/core/WebAuthnP256.ts

Parameters

options

  • Type: getCredentialRequestOptions.Options

Options.

options.challenge

  • Type: 0x${string}

The challenge to sign.

options.credentialId

  • Type: string
  • Optional

The credential ID to use.

options.rpId

  • Type: string
  • Optional

The relying party identifier to use.

options.userVerification

  • Type: UserVerificationRequirement
  • Optional

The user verification requirement.

Return Type

The credential request options.

internal.CredentialRequestOptions