Documentation Index
Fetch the complete documentation index at: https://docs.spn.wtf/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints
Sign Up
Body
| Field | Type | Required | Description |
|---|
username | string | Yes | Min. 3 characters |
email | string | Yes | Valid email |
password | string | Yes | Min. 6 characters |
referralCode | string | No | Optional referral code |
Response — 201 Created
{
"user": { "id": 1, "username": "john", "email": "john@example.com" },
"accessToken": "eyJ..."
}
Login
Body
| Field | Type | Required | Description |
|---|
email | string | Yes | Email or username |
password | string | Yes | — |
Response — 200 OK
{
"user": { "id": 1, "username": "john", "email": "john@example.com" },
"accessToken": "eyJ..."
}
Logout
Clears session cookies. No body required.
Refresh Token
Uses the HTTP-only refresh token cookie to issue a new access token.
Response — 200 OK
{ "accessToken": "eyJ..." }
Check Auth Status
Returns the current authenticated user, or 401 if not authenticated.
Forgot Password
POST /api/auth/forgot-password
Body
| Field | Type | Required |
|---|
email | string | Yes |
Sends a password reset link to the provided email.
OAuth — Google
GET /api/auth/google/url # Get Google OAuth redirect URL
GET /api/auth/google/callback # OAuth callback (handled by Google redirect)
GET /api/auth/twitter/url # Get Twitter OAuth redirect URL
GET /api/auth/twitter/callback # OAuth callback (handled by Twitter redirect)