Skip to main content
Yboard provides built-in JWT-based authentication with support for password-based login, OAuth providers, and session management.

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

  1. User registers with email and password
  2. Password is hashed with bcrypt and stored
  3. On login, credentials are verified
  4. JWT access token + refresh token are returned
  5. Access token is sent with each API request

OAuth Flow

  1. Client initiates OAuth with PKCE
  2. User is redirected to the provider (Google, GitHub, etc.)
  3. Provider redirects back with authorization code
  4. Yboard exchanges code for provider tokens
  5. User account is created or linked
  6. 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

  1. Always use HTTPS in production
  2. Store tokens securely — use httpOnly cookies or secure storage
  3. Set short access token expiry — 1 hour recommended
  4. Enable email verification for production apps
  5. Use RLS policies to control data access per user