Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/KingPsychopath/oooc-fete-finder/llms.txt

Use this file to discover all available pages before exploring further.

The authentication API allows users to verify their identity and manage their session state. Authentication is optional but enables features like event submissions and personalized content.

POST /api/auth/verify

Validates user details and creates an authenticated session by setting the oooc_user_session cookie.

Request

firstName
string
required
User’s first name (minimum 2 characters)
lastName
string
required
User’s last name (minimum 2 characters)
email
string
required
Valid email address (max 254 characters)
User consent acknowledgment (must be true)
source
string
Optional source identifier (defaults to "fete-finder-auth")

Response

success
boolean
required
Indicates if the verification was successful
email
string
Verified email address (returned on success)
storedIn
string
Storage provider used (e.g., "postgres", "memory")
message
string
Status message: "User verified" for new users or "Existing user verified" for returning users
error
string
Error message (returned on failure)
issues
array
Detailed validation errors (when applicable)

Rate limits

  • IP-based: 60 requests per minute per IP
  • Email+IP-based: 6 requests per 15 minutes per email/IP combination
When rate limited, the response includes a Retry-After header indicating seconds to wait.

Examples

const response = await fetch('/api/auth/verify', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    firstName: 'Marie',
    lastName: 'Dupont',
    email: 'marie@example.com',
    consent: true,
    source: 'newsletter-signup'
  })
});

const data = await response.json();
// {
//   "success": true,
//   "email": "marie@example.com",
//   "storedIn": "postgres",
//   "message": "User verified"
// }

GET /api/auth/session

Returns the current authentication session state for both public users and admin users.

Response

success
boolean
required
Always true
isAuthenticated
boolean
required
Whether the user has a valid public session
isAdminAuthenticated
boolean
required
Whether the user has admin privileges
email
string | null
required
Email address from the session cookie, or null if not authenticated

Examples

const response = await fetch('/api/auth/session');
const data = await response.json();
// {
//   "success": true,
//   "isAuthenticated": true,
//   "isAdminAuthenticated": false,
//   "email": "marie@example.com"
// }

DELETE /api/auth/session

Clears the current user session by removing the oooc_user_session cookie.

Response

success
boolean
required
Always true

Example

const response = await fetch('/api/auth/session', {
  method: 'DELETE'
});

const data = await response.json();
// { "success": true }