Source: equa-server/modules/api/src/endpoints/auth-endpoints.ts
Auth Endpoints
Endpoints for user authentication, registration, password reset, email verification, two-factor authentication, and account management. Endpoint count: 19 (12 public, 7 authenticated)Public Endpoints
These endpoints do not require an active session.Get Current User
Returns the current authenticated user, or an unauthenticated response if no valid session exists.
Get Current User (Deprecated)
Legacy endpoint that returns the same response as
GET /v1/user/current.
Response:
Login
Authenticate with email and password. Sets a session cookie on success.
Request:
Google OAuth Login
Authenticate using a Google OAuth ID token. Creates or links a user account and establishes a session.
Request:
Register
Create a new user account. The registration endpoint captures the client IP via
request-ip middleware and enforces the REGISTRATION_IP_LIMIT (default 20 per IP).
Request:
Check Email Availability
Check whether an email address is available for registration.
Request:
Check Username Availability
Check whether a username is available for registration.
Request:
Reset Password
Send a password reset email to the specified username or email address.
Request:
Verify Email
Verify an email address using a verification code received via email.
Request:
Resend Verification Email
Resend the email verification message. Throttled by
EMAIL_VERIFICATION_LIMIT_SECONDS (default 1800s / 30 minutes).
Request:
Generate 2FA Secret
Generate a new TOTP two-factor authentication secret and QR code for setup.
Verify 2FA Token
Verify a TOTP token against a 2FA secret during setup.
Request:
Authenticated Endpoints
These endpoints require an active session.Enable 2FA
Enable two-factor authentication on the authenticated user’s account after successful token verification.
Request:
Update User Profile
Update the current user’s profile information.
Request:
List Users
List all users (site admin only).
Logout
Destroy the current session and clear the session cookie.
Get User Coupon
Get coupon information for the authenticated user.
Update User Account
Update account-level settings for the specified user.
Get User Account
Retrieve account-level details for the specified user.