Changeset 1b4d5dd in Klonkt for src/routes


Ignore:
Timestamp:
06/16/2026 06:23:28 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
f63cbc2
Parents:
a9e23f6
Message:

Patreon premium gate (Phase 1): entitlement verification + Connect Patreon + isPremium

Klonkt-side of the Patreon model. The license server signs an Ed25519 JWT
entitlement token; this instance verifies it OFFLINE with Node-crypto
against /pubkey (no jose dependency). PatreonService: verify/store/isPremium.
Routes /admin/patreon/connect|callback|disconnect. Premium card in
Admin → Settings.

Premium is OFF BY DEFAULT (env KLONKT_PREMIUM_ENABLED != on) → no premium
UI, nothing gated. Inert deployment until the self-hoster enables it and
connects Patreon. Gating Hub/Statistics/Fan login follows in Phases 2-4.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

Location:
src/routes
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/admin-settings.js

    ra9e23f6 r1b4d5dd  
    2222import { requireGod } from '../middleware/auth.js';
    2323import { getTenancy, setTenancy, getSetting, setSetting } from '../services/SettingsService.js';
     24import { entitlementStatus } from '../services/PatreonService.js';
    2425
    2526const router = express.Router();
     
    7475    hubHeroImage: getSetting('hub_hero_image') || '',
    7576    hubHeroOverlay: clampOverlay(getSetting('hub_hero_overlay')),
     77    premium: entitlementStatus(),
    7678    success: req.query.success || null,
    7779    error: req.query.error || null,
Note: See TracChangeset for help on using the changeset viewer.