The auth API handles the complete identity lifecycle: account creation, credential-based login, JWT token management, email verification, password recovery, and OAuth sign-in via Google or GitHub. All endpoints are mounted under theDocumentation Index
Fetch the complete documentation index at: https://docs.shipfastai.dev/llms.txt
Use this file to discover all available pages before exploring further.
/api/auth/ prefix.
POST /api/auth/register
Create a new user account. After registration, a verification email is sent to the provided address.The user’s email address. Must be a valid email format and not already registered.
The user’s password in plain text. It is hashed before storage.
The user’s display name. Optional.
UserResponse:
UUID of the newly created user.
The registered email address.
The user’s display name, if provided.
Profile picture URL.
null for newly registered users.Whether the account is active.
true by default on registration.Whether the email has been verified.
false until the verification link is clicked.The OAuth provider used to sign in (
google, github), or null for password-based accounts.Current subscription status (e.g.,
free, active, cancelled).Subscription tier (e.g.,
free, pro).ISO 8601 timestamp of when the account was created.
POST /api/auth/login
Authenticate with email and password. Returns a JWT access token and refresh token.The user’s registered email address.
The user’s password.
Token:
JWT access token. Valid for 30 minutes. Pass this in the
Authorization header.JWT refresh token. Use this to obtain a new access token after expiry.
Always
"bearer".The authenticated user object. See
UserResponse fields above.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:Bearer <access_token>UserResponse (see fields above):
POST /api/auth/verify-email
Verify a user’s email address using the token sent to them after registration.The verification token extracted from the link in the verification email.
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.
The email address to resend the verification link to.
POST /api/auth/forgot-password
Request a password reset email. Like resend-verification, this always returns200 to prevent email enumeration.
The email address associated with the account.
POST /api/auth/verify-reset-token
Check whether a password reset token is still valid before presenting the reset form to the user.The password reset token from the reset email link.
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.The password reset token from the reset email link.
The new password to set for the account.
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.The full URL to redirect the user to in order to begin the OAuth flow.
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}.