/api/auth/ prefix.
POST /api/auth/register
Create a new user account. After registration, a verification email is sent to the provided address.UserResponse:
POST /api/auth/login
Authenticate with email and password. Returns a JWT access token and refresh token.Token:
POST /api/auth/refresh
Exchange a valid refresh token for a new access token and refresh token pair. Both tokens are rotated on every call.A valid, unexpired refresh token previously issued by
/api/auth/login or a prior /api/auth/refresh call.Token (same shape as login, user field is null):
POST /api/auth/logout
Log out the current user. Because JWTs are stateless, the server does not invalidate the token — the client is responsible for discarding both tokens from storage. No request body required.GET /api/auth/me
Return the profile of the currently authenticated user. Headers:UserResponse (see fields above):
POST /api/auth/verify-email
Verify a user’s email address using the token sent to them after registration.POST /api/auth/resend-verification
Resend the verification email to a registered address. This endpoint always returns200 regardless of whether the email is registered, to prevent email enumeration.
POST /api/auth/forgot-password
Request a password reset email. Like resend-verification, this always returns200 to prevent email enumeration.
POST /api/auth/verify-reset-token
Check whether a password reset token is still valid before presenting the reset form to the user.400 with {"detail": "Invalid or expired reset token"} if the token is invalid or expired.
POST /api/auth/reset-password
Set a new password using a valid password reset token.GET /api/auth/oauth/
Initiate an OAuth sign-in flow. Returns the authorization URL that you redirect the user to. Supported providers aregoogle and github.
The OAuth provider to use. Must be
google or github. The provider must be configured in your backend settings.A CSRF state token. Pass this back when handling the OAuth callback to validate the flow.
GET /api/auth/callback/{provider}, which exchanges the code for tokens and redirects the browser to {FRONTEND_URL}/auth/callback?access_token=...&refresh_token=....
The callback endpoint is handled automatically by the backend — you do not need to call it directly. Configure your OAuth app’s redirect URI to point to
{your-backend-url}/api/auth/callback/{provider}.