Skip to main content

Introduction

S-Auth is a complete OAuth2 provider solution designed for family applications. It provides secure authentication and authorization for all your personal projects and family services.

What is S-Auth?

S-Auth consists of three main components:

OAuth Provider

A Cloudflare Workers-based OAuth2 provider that handles:

  • User authentication with secure login flows
  • OAuth2 authorization code flow with PKCE support
  • Client credentials flow for service-to-service auth
  • Token management (access tokens, refresh tokens)
  • OpenID Connect compatible endpoints

Admin Dashboard

A Next.js admin interface for managing:

  • User accounts (create, edit, suspend, reset passwords)
  • OAuth applications/clients
  • System configuration

Launchpad

A user-facing application portal where users can:

  • Discover all available applications
  • Launch applications with single sign-on
  • View their authorized applications

Architecture

┌─────────────────────────────────────────────────────────────────┐
│ S-Auth System │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ OAuth │ │ Admin │ │ Launchpad │ │
│ │ Provider │ │ Dashboard │ │ │ │
│ │ │ │ │ │ │ │
│ │ Cloudflare │ │ Vercel │ │ Vercel │ │
│ │ Workers │ │ Next.js │ │ Next.js │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ └──────────────────┼──────────────────┘ │
│ │ │
│ ┌──────┴──────┐ │
│ │ D1 │ │
│ │ Database │ │
│ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

Key Features

  • Secure by Default - bcrypt password hashing, cryptographically secure tokens, PKCE support
  • Family Friendly - Simple user ID format (initials + number, e.g., JD-1234)
  • Modern Stack - Cloudflare Workers, D1 SQLite, Next.js 14
  • Self-Hosted - Full control over your authentication infrastructure
  • OpenID Connect - Standard-compliant discovery endpoint