Auth

Enrol or replace the authenticator app

Issues a new TOTP secret and its QR. First enrolment needs no body but may not be reached with the `pending_2fa` token (the e-mailed code comes first). Replacing a PROVEN device needs `auth_code` from it. Same contract as `POST /api/v1/auth/authenticator`.

POST
/api/v2/auth/authenticator

Authorization

CookieSessionObject
b2t_access<token>

Session JWT in the HttpOnly cookie b2t_access, set by the login endpoints. Mutations also send the header X-B2T-CSRF: 1 (otherwise 403).

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v2/auth/authenticator" \  -H "Content-Type: application/json" \  -d '{}'
Empty
Empty
{  "message": {    "error": "Your request was made with invalid credentials."  }}