Shipfastai includes a complete authentication system out of the box. You get JWT-based login with short-lived access tokens and long-lived refresh tokens, OAuth sign-in with Google and GitHub, email verification on registration, and a two-step password reset flow. All auth endpoints live 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.
Registering a user
Send aPOST request to /api/auth/register with the user’s email, password, and full name. On success, the server creates the account, sends a verification email, and returns the new user object. The user is not yet verified at this point.
Request
Response — 200 OK
Logging in
Send aPOST request to /api/auth/login with the user’s credentials. A successful response contains an access_token, a refresh_token, and the user object.
Request
Response — 200 OK
access_token in the Authorization: Bearer <token> header on every subsequent request that requires authentication.
Refreshing tokens
Access tokens are short-lived. When one expires, send the storedrefresh_token to /api/auth/refresh to get a new pair of tokens without requiring the user to log in again.
Request
Response — 200 OK
OAuth login
To start an OAuth flow, direct the user’s browser toGET /api/auth/oauth/{provider} where {provider} is either google or github. The endpoint returns an authorization URL and a state token.
Response — 200 OK
authorization_url. After the user grants access, the provider sends them back to GET /api/auth/callback/{provider}?code=...&state=.... The backend exchanges the code for the user’s profile, creates or links the account, then issues tokens and redirects to:
Email verification
After registering, the user receives an email containing a verification link. That link includes a short-lived token (valid for 24 hours). Submit that token to verify the account.Request
Response — 200 OK
Request
200 regardless of whether the email is registered, to prevent user enumeration.
Password reset
Password reset is a two-step process. Step 1 — request a reset linkRequest
Response — 200 OK
Request
Response — 200 OK
POST /api/auth/verify-reset-token with { "token": "..." }. It returns { "valid": true } if the token is still usable.