Available sign-in methods
Which web sign-in providers are configured, so the sign-in page only offers working options. Email codes are always available.
Response Body
application/json
curl -X GET "https://example.com/api/v1/auth/providers"nullVerify OTP and sign in POST
Verify the 6-digit code sent by `/otp/send` and return a token pair. If no account exists for the email, one is created automatically (passwordless sign-up). The response contains: - `access_token` — JWT, expires in **15 minutes**. Pass as `Authorization: Bearer <token>`. - `refresh_token` — opaque string, expires in **30 days**. Use `/refresh` to rotate. - `user.role` — the account's current role: `patient` | `doctor` | `clinic_staff` | `clinic_admin` | `admin`. **Any role can sign in via OTP.** The role field in the response tells the client which UI to display (patient app vs. doctor dashboard).
Rotate token pair POST
Exchange a valid refresh token for a new `access_token` + `refresh_token` pair. The old refresh token is **immediately revoked**. Clients should store the new refresh token from the response. Call this automatically whenever a request returns HTTP 401.