Skip to main content
POST
https://{host}/me/v1
/
authentication-methods
C#
using Auth0Auth0;
using System.Threading.Tasks;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new Auth0Auth0Client(
            token: "<token>"
        );

        await client.AuthenticationMethods.CreateAsync(
            new CreatePasskeyAuthenticationMethod {
                Type = "passkey"
            }
        );
    }

}
{
  "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

Name of the database connection

Required string length: 1 - 128
Pattern: ^[a-zA-Z0-9-]+$
identity_user_id
string

Identity provider user ID

Required string length: 1 - 255
Pattern: ^\S+$

Response

Enrollment started

auth_session
string
required

The unique session identifier for the enrollment.

authn_params_public_key
object
required