Skip to main content
POST
/
authentication-methods
TypeScript
import { MyAccountClient } from "github.com/auth0/myaccount-js";

async function main() {
    const client = new MyAccountClient({
        token: "<token>",
    });
    await client.authenticationMethods.create({
        type: "passkey",
    });
}
main();
{
  "auth_session": "<string>",
  "authn_params_public_key": {
    "challenge": "<string>",
    "pubKeyCredParams": [
      {
        "type": "public-key",
        "alg": -8
      },
      {
        "type": "public-key",
        "alg": -7
      },
      {
        "type": "public-key",
        "alg": -257
      }
    ],
    "rp": {
      "name": "<string>",
      "id": "<string>"
    },
    "user": {
      "id": "<string>",
      "name": "<string>",
      "displayName": "<string>"
    },
    "authenticatorSelection": {
      "residentKey": "required",
      "userVerification": "required"
    },
    "timeout": 60000
  }
}

Authorizations

Authorization
string
header
required

Bearer and DPoP tokens are supported depending on the API configuration

Body

application/json

Request content for creating an authentication method

type
string
default:passkey
required

Authentication method type (factor)

Allowed value: "passkey"
connection
string

Connection name

identity_user_id
string

The ID of the user identity linked with the authentication method

Response

Enrollment started

auth_session
string
required

The unique session identifier for the enrollment.

authn_params_public_key
object
required