Authentication Flow
Authentication Methods
1. JWT Token (Cookie-Based)
The primary auth method for dashboard users. How it works:- User logs in with email/password via
POST /auth/login - Backend creates a JWT signed with
HS256algorithm usingJWT_API_SECRET - Token is set as an
httpOnlycookie namedaccess_token - A
refresh_tokencookie is also set for token renewal - All subsequent requests include the cookie automatically
The
sub claim contains the user’s UUID, which is used to look up the full user record on each request.2. API Key (Header-Based)
For server-to-server integrations and external API access.Login
Signup
Token Refresh
When the access token expires, the UI automatically calls the refresh endpoint:access_token cookie is set in the response.