Auth
✅ Validado (off-chain / infra)
Suite plataforma — register/login/refresh/me/logout/unified/siwe/passkey validados (51/51).
Gerada automaticamente do spec OpenAPI da API (fonte de verdade). 10 endpoint(s).
Login
POST /auth/login
Authenticate with email and password. Returns JWT tokens.
Auth: pública / api-key
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
email | string (email) | sim | |
password | string | sim |
Respostas: 200, 401
Logout
POST /auth/logout
Revoke a refresh token.
Auth: jwt
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
refresh_token | string | sim |
Respostas: 200
Get current user
GET /auth/me
Returns the authenticated user profile.
Auth: jwt
Respostas: 200
Update profile
POST /auth/me
Update the authenticated user's profile (name, company).
Auth: jwt
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
full_name | string | não | |
company_name | string | não |
Respostas: 200, 201
Update profile (PATCH legacy)
PATCH /auth/me
Auth: jwt
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
full_name | string | não | |
company_name | string | não |
Respostas: 200
Generate passkey challenge
GET /auth/passkey/challenge
Returns a short-lived challenge for dashboard passkey registration or authentication.
Auth: pública / api-key
Query params:
| Param | Tipo | Obrigatório |
|---|---|---|
intent | register | authenticate | sim |
Respostas: 200
Refresh tokens
POST /auth/refresh
Exchange a refresh token for new access + refresh tokens.
Auth: pública / api-key
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
refresh_token | string | sim |
Respostas: 200, 401
Register new tenant
POST /auth/register
Creates a new tenant and user account. Returns JWT tokens.
Auth: pública / api-key
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
email | string (email) | sim | |
password | string | sim | |
company_name | string | sim | |
full_name | string | sim |
Respostas: 201, 409
Generate SIWE nonce
GET /auth/siwe/nonce
Returns a nonce for EIP-4361 Sign-In With Ethereum flows in the dashboard.
Auth: pública / api-key
Respostas: 200
Unified dashboard authentication
POST /auth/unified
Single auth entrypoint for email/password, wallet SIWE, passkeys, Google OAuth, and Apple OAuth login.
Auth: pública / api-key
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
method | email | siwe | oauth | passkey | sim | |
email | string (email) | não | |
password | string | não | |
message | string | não | |
signature | string | não | |
address | string | não | |
provider | google | apple | não | |
id_token | string | não | |
flow | register | authenticate | não | |
challenge | string | não | |
credential_id | string | não | |
client_data_json | string | não | |
public_key | PasskeyPublicKeyDto | não | |
authenticator_data | string | não | |
passkey_signature | string | não |
Respostas: 200, 400, 401