Skip to content

Get authentication options

GET
/auth/authentication

Initiates WebAuthn authentication by generating authentication options for a user. Sets a session HTTP-only cookie. This endpoint provides the necessary challenge, relying party info, and credential parameters required for client-side WebAuthn authentication.

SIWE Flow

When called with an Ethereum address as credentialId, this endpoint creates a SIWE challenge message that proves ownership of the address. The server generates a cryptographic nonce, sets it as a short-lived HTTP-only session_id cookie, and returns a formatted SIWE message containing the challenge, domain, and expiration time.

credentialId
Any of:
Ethereum address

Address to sign in with. Required for Sign-in with Ethereum.

string

WebAuthn authentication options

Any of:
Sign-in with Ethereum
object
method
required
Method

Sign-in with Ethereum.

Allowed values: siwe
address
required
Address

Address to sign in with.

string
message
required
Message

Message to sign.

string