Skip to content

Move auth server-side + fix reload-from-file-source - #1

Merged
cankilic-gh merged 2 commits into
mainfrom
fix/reload-from-file-source
Aug 4, 2026
Merged

Move auth server-side + fix reload-from-file-source#1
cankilic-gh merged 2 commits into
mainfrom
fix/reload-from-file-source

Conversation

@cankilic-gh

Copy link
Copy Markdown
Owner

Summary

  • 72b6278 – Move auth server-side: env credentials (AUTH_USER, AUTH_PASS, AUTH_SECRET), signed HttpOnly session cookie via HMAC-SHA256, Next.js middleware gate (fail-closed — redirects to /login if secret is missing)
  • d55e2c8 – Replace history-index dirty tracking with XML baseline and file-handle reload priority; adds src/lib/reloadSource.ts + comprehensive test suite (235 LOC, 51 tests passing)

Gates passed

  • npm run test → 51 passed / 4 skipped ✓
  • npm run build → Compiled successfully, all 6 routes generated ✓
  • TypeScript clean ✓

BLOCKER — do not merge until resolved

vercel env ls shows zero production environment variables for this project.
The auth middleware requires three secrets to be added to Vercel before merge:

Variable Purpose
AUTH_USER Login username
AUTH_PASS Login password
AUTH_SECRET HMAC-SHA256 session signing key

Without these, production deploys fail-closed: every page redirects to /login and the login API returns HTTP 500 "Auth is not configured on the server".

To unblock: run vercel env add AUTH_USER production, repeat for AUTH_PASS and AUTH_SECRET, then merge this PR.

Test plan

  • vercel env add the three secrets (Production environment)
  • Merge PR
  • Wait for Vercel deployment → Ready
  • curl -I https://formforge.thegridbase.com/ → expect redirect to /login (not 500)
  • Login with credentials → expect redirect to / (200)
  • Verify toolbar shows deploy timestamp later than Jul 22

🤖 Generated with Claude Code

cankilic-gh and others added 2 commits July 22, 2026 14:56
…leware gate

Replaces the client-side AuthGuard whose credentials were hardcoded in a
public repo. Login posts to /api/login which checks AUTH_USER/AUTH_PASS
and sets an HMAC-signed session cookie; middleware verifies it for every
page and fails closed. Credentials no longer ship in the client bundle.

Requires AUTH_USER, AUTH_PASS, AUTH_SECRET env vars on Vercel before deploy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
formforge Ready Ready Preview Aug 4, 2026 6:15pm

@cankilic-gh
cankilic-gh merged commit 8f9842f into main Aug 4, 2026
3 checks passed
@cankilic-gh
cankilic-gh deleted the fix/reload-from-file-source branch August 4, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant