All authentication endpoints are handled by Better-Auth through a catch-all route atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/revokslab/shipfree/llms.txt
Use this file to discover all available pages before exploring further.
/api/auth/*.
Implementation
Fromsrc/app/api/auth/[...all]/route.ts:1-5:
Base URL
All endpoints are prefixed with/api/auth. The base URL is configured in src/lib/auth/auth.ts:20:
Email & Password Endpoints
Sign Up
User’s email address
User’s password (minimum requirements defined by Better-Auth)
User’s display name
Created user object
Session object if auto-signin is enabled
Sign In
User’s email address
User’s password
Authenticated user object
Created session
Forget Password
Email address to send reset link
URL to redirect after clicking reset link
Reset Password
New password
Reset token from email
Email OTP Endpoints
Send OTP
Email to send OTP code
OTP type:
sign-in, email-verification, or forget-passwordsrc/lib/auth/auth.ts:186-188):
- OTP Length: 6 digits
- Expiration: 15 minutes
- Delivery: Via configured email service
Verify OTP
Email address
6-digit OTP code from email
Authenticated user object
Created session
OAuth Endpoints
Initiate OAuth Flow
OAuth provider:
google, github, microsoft, or facebookURL to redirect after authentication
src/lib/auth/auth.ts:45-78):
Google OAuth
Google OAuth
Required Environment Variables:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
email, profileGitHub OAuth
GitHub OAuth
Required Environment Variables:
GITHUB_CLIENT_IDGITHUB_CLIENT_SECRET
user:emailMicrosoft OAuth
Microsoft OAuth
Required Environment Variables:
MICROSOFT_CLIENT_IDMICROSOFT_CLIENT_SECRETMICROSOFT_TENANT_ID(optional, defaults to ‘common’)
Facebook OAuth
Facebook OAuth
Required Environment Variables:
FACEBOOK_CLIENT_IDFACEBOOK_CLIENT_SECRET
email, public_profileOAuth Callback
Better-Auth automatically handles OAuth callbacks at:Session Endpoints
Get Session
Current session or null if not authenticated
Sign Out
Organization Endpoints
Create Organization
Organization name
URL-friendly slug
Created organization
Invite Member
Organization ID
Email of person to invite
Role:
member or adminError Responses
All endpoints return standard HTTP status codes:Invalid request parameters or validation error
Authentication required or invalid credentials
Insufficient permissions
Resource not found
Server error
Cookie Configuration
Fromsrc/lib/auth/auth.ts:26-33:
Next Steps
Authentication Overview
Learn about authentication features
Database Schema
View auth-related database tables