All Projects

SJForge Auth Hub

Production

Centralized SSO for all SJForge applications

Problem

Multiple SJForge tools need unified authentication and authorization, with users logging in once to access all their authorized applications.

Solution

A lightweight Next.js app serving as the SSO hub. Same-domain apps share Supabase session cookies; cross-project apps use HMAC-SHA256 tokens with 60-second TTL.

Key Features

  • Supabase email/password authentication
  • Tool picker with auto-redirect for single-tool users
  • Cross-subdomain cookie sharing (.sjforge.dev)
  • HMAC-SHA256 token exchange (60s TTL)
  • Role-based access control
  • Nexus Design System UI

Tech Stack

Next.jsTypeScriptSupabaseTailwind CSSHMAC-SHA256Vercel

Architecture

Hub-and-spoke auth: shared Supabase project for same-domain tools, HMAC tokens for cross-project apps. Middleware handles session refresh. Three database tables: users, tools, access grants.

Screenshots

Screenshots coming soon

Metrics

2
Auth Methods
60s
Token TTL
3
Database Tables

My Role

Sole developer. Designed the SSO architecture, implemented both cookie and token auth flows.