Skip to content

Implement authentication: login, logout, and route protection - #17

Merged
jasoncrawford merged 1 commit into
mainfrom
auth
Feb 18, 2026
Merged

jasoncrawford merged 1 commit into
mainfrom
auth

Conversation

@jasoncrawford

Copy link
Copy Markdown
Collaborator

Summary

  • Adds login page (/login) with email/password form matching the mockup style
  • Implements server actions for login and logout using Supabase Auth
  • Adds Next.js middleware to protect /settings, redirect unauthenticated users, and refresh sessions
  • Creates shared Header component with conditional auth navigation (Settings + Log out when authenticated, Log in when not)
  • Updates layout to include Header and set background color
  • Adds @ path alias to vitest.config.ts for test imports
  • Includes 8 new tests: 4 for login/logout actions, 4 for middleware route protection

Test plan

  • All 14 Vitest tests pass (including 8 new auth/middleware tests)
  • Next.js build succeeds with no type errors
  • CI passes on this PR

Closes #4

🤖 Generated with Claude Code

Adds email/password login page matching the mockup design, server actions
for login/logout, Next.js middleware protecting /settings and refreshing
sessions, and a shared Header component with conditional auth navigation.
Includes tests for login/logout actions and middleware route protection.

Closes #4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford
jasoncrawford merged commit bad87bc into main Feb 18, 2026
1 check passed
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.

Implement authentication: login, logout, and route protection

1 participant