Overview
ClypAI uses Better Auth for authentication, providing secure user authentication, session management, and organization access control. All authentication endpoints are accessible at:Better Auth handles authentication automatically when using the ClypAI web interface. The information below is for developers integrating with ClypAI or building custom authentication flows.
Authentication Methods
ClypAI supports multiple authentication methods:Email and Password
Sign Up
Create an account using email and password. Email verification is required.Note: Sign-ups may be restricted during beta. Check the waitlist if you can’t create an account.
GitHub OAuth
Authenticate using your GitHub account:- Click Continue with GitHub on the sign-in page
- Authorize ClypAI to access your GitHub profile
- Your account will be created or linked automatically
GitHub OAuth may be disabled during beta periods to control access.
Waitlist System
ClypAI uses a waitlist system for controlled access:Joining the Waitlist
If sign-ups are closed, you can join the waitlist:- Visit clypai.com
- Click Join Waitlist
- Provide your email and details
- You’ll receive a confirmation email
- Maximum participants: 1,000
- Rate limit: 5 attempts per 10 minutes
- Notifications: Email on join, accept, or reject
Checking Waitlist Status
You can check your position and status via email notifications sent through Resend.Organization Management
Upon signup, ClypAI automatically creates a personal organization for each user.Creating Organizations
Organizations are created automatically using the Better Auth organization plugin:Setting Active Organization
Switch between organizations:Session Management
Better Auth handles session management with secure tokens:- Sessions are HTTP-only cookies
- Automatic session refresh
- Secure token storage
- CSRF protection included
Getting Current Session
Server-side session retrieval:Pricing Integration
ClypAI integrates Better Auth with Polar for subscription management:- Product ID:
3ec54eb9-420c-433f-9500-bf36e2f65f4a(Pro plan) - Checkout: Available for authenticated users only
- Customer creation: Automatic on sign-up
- Usage tracking: Enabled via Polar plugin
Security Best Practices
Use HTTPS Only
Use HTTPS Only
Always use HTTPS when communicating with ClypAI authentication endpoints. Better Auth enforces secure connections.
Trusted Origins
Trusted Origins
ClypAI accepts authentication requests from:
https://clypai.comhttps://*.clypai.comhttps://*.clyp.ai- Vercel preview deployments
Session Security
Session Security
- Sessions are HTTP-only cookies
- Sessions expire automatically
- No session data stored in localStorage
- CSRF tokens protect against cross-site attacks
Email Verification
Email Verification
All email/password accounts require email verification via Resend before accessing the platform.
Environment Variables
ClypAI authentication requires these environment variables:Secret key for Better Auth encryption and signing
Base URL for Better Auth callbacks (e.g.,
https://clypai.com)PostgreSQL connection string for user and session storage
GitHub OAuth application client ID (if GitHub auth is enabled)
GitHub OAuth application client secret (if GitHub auth is enabled)
Resend API key for sending email verifications and waitlist notifications
Polar API token for subscription management
Redirect URL after successful Polar checkout
Database Schema
Better Auth stores authentication data in PostgreSQL:- users - User accounts and profiles
- sessions - Active user sessions
- organizations - Organization data
- organization_members - Organization membership
- waitlist - Waitlist entries and status
API Keys (Planned)
When available, API keys will:- Provide programmatic access to ClypAI
- Support separate development and production keys
- Include scoped permissions for fine-grained access
- Be manageable via the ClypAI dashboard
Admin Access
The Better Auth admin plugin provides administrative capabilities:- User management
- Organization oversight
- Session monitoring
- Waitlist approval/rejection
Next Steps
Sign Up
Create your ClypAI account
Join Waitlist
Get early access when available
Better Auth Docs
Learn more about Better Auth
Support
Get help with authentication
Troubleshooting
Email verification not received
Email verification not received
- Check spam/junk folder
- Verify email address is correct
- Wait a few minutes and try resending
- Contact support if issue persists
GitHub OAuth not working
GitHub OAuth not working
- Ensure you’re using a verified GitHub account
- Check if GitHub OAuth is enabled (may be disabled during beta)
- Try clearing cookies and signing in again
Waitlist status unknown
Waitlist status unknown
- Check the email you used to join the waitlist
- Look for confirmation from [email protected] or [email protected]
- Contact support with your email address
Session expired
Session expired
- Sign in again to create a new session
- Sessions expire after a period of inactivity
- Close and reopen your browser if issues persist
For questions about authentication or account access, visit our support page.