Overview
Every Yboard project includes a complete authentication system. Users can sign up, log in, and manage sessions without writing any auth logic.Technology Stack
Authentication Flow
Password-Based Authentication
- User registers with email and password
- Password is hashed with bcrypt and stored
- On login, credentials are verified
- JWT access token + refresh token are returned
- Access token is sent with each API request
OAuth Flow
- Client initiates OAuth with PKCE
- User is redirected to the provider (Google, GitHub, etc.)
- Provider redirects back with authorization code
- Yboard exchanges code for provider tokens
- User account is created or linked
- JWT tokens are returned to the client
JWT Token Structure
Token Payload
Token Claims
API Endpoints
Authentication Endpoints
OAuth Endpoints
Admin Endpoints
OAuth Provider Configuration
Yboard supports these built-in OAuth providers:- Google — OAuth 2.0
- GitHub — OAuth
- Custom providers — Any OAuth 2.0 / OpenID Connect compatible provider
Custom OAuth Providers
You can add any OAuth 2.0 provider by configuring:Security Features
- bcrypt password hashing with configurable rounds
- JWT RS256 signing with per-project key pairs
- Refresh token rotation — old tokens are invalidated on refresh
- Rate limiting on auth endpoints
- Email verification with configurable OTP or link
- Password reset flow with secure tokens
Security Best Practices
- Always use HTTPS in production
- Store tokens securely — use
httpOnlycookies or secure storage - Set short access token expiry — 1 hour recommended
- Enable email verification for production apps
- Use RLS policies to control data access per user