devRant API: Authentication & accounts

Write operations authenticate with the devRant token triple. Log in once below and every
authenticated widget across these pages becomes runnable (the token is kept in your browser
only). Read operations (rants,
profiles) need no authentication.

POST /api/users/auth-token returns an auth_token whose id is the token_id, key is the
token_key, and user_id is the integer user id; those three are sent automatically by these
widgets (query params for GET/DELETE, form body for POST). A bad login returns HTTP 400.
See the overview for the response envelope.

POST /api/users/auth-token Minimal role: Public

Log in

Authenticate with username (or email) and password. Running this here logs you in for every widget on these pages.

POST /api/users Minimal role: Public

Register

Create a new account. Returns an auth token (you are logged in immediately).

DELETE /api/users/me Minimal role: Member

Deactivate account

Deactivate the logged-in account and revoke its tokens.