All Forge API endpoints require authentication using session cookies provided by BetterAuth.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mvriu5/forge/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
Forge uses BetterAuth for authentication. When a user signs in through the web interface, a session cookie is created and automatically included in subsequent requests.Session Cookie
The session is stored in a cookie that is:- HttpOnly - Cannot be accessed by JavaScript
- Secure - Only transmitted over HTTPS in production
- SameSite - Protected against CSRF attacks
Making Authenticated Requests
When making API requests from: Browser/Web Application:Getting a Session Token
Web Application
In a web application, users authenticate through the BetterAuth login flow:- User visits the login page
- Signs in with email/password or OAuth provider
- BetterAuth creates a session cookie automatically
- All subsequent API requests include the cookie
Programmatic Access
For server-to-server or script-based access, you’ll need to:- Authenticate using BetterAuth’s API endpoints
- Extract the session cookie from the response
- Include it in subsequent requests
Session Verification
Every API endpoint verifies the session using:session object contains:
Unauthorized Response
If authentication fails, the API returns:Security Best Practices
- Store session cookies securely
- Use HTTPS in production to prevent token interception
- Implement proper session expiration and refresh mechanisms
- Never log or expose session tokens
- Validate sessions on every request
OAuth Providers
Forge supports authentication through:- Google OAuth
- GitHub OAuth
- Notion OAuth