feat(auth): @mosaic/auth — BetterAuth email/password setup #68

Merged
jason.woltje merged 1 commits from feat/p0-004-auth-package into main 2026-03-13 02:21:16 +00:00
Owner

Summary

  • Implements P0-004: BetterAuth with Drizzle adapter
  • Email/password auth enabled, role field for RBAC
  • createAuth() factory with DI-friendly config
  • 7-day sessions with daily refresh

Verification

  • Auth instance created successfully
  • Handler function and API methods confirmed (signUpEmail, signInEmail, getSession, signOut)
  • All monorepo gates green

Closes #4

## Summary - Implements P0-004: BetterAuth with Drizzle adapter - Email/password auth enabled, role field for RBAC - createAuth() factory with DI-friendly config - 7-day sessions with daily refresh ## Verification - Auth instance created successfully - Handler function and API methods confirmed (signUpEmail, signInEmail, getSession, signOut) - All monorepo gates green Closes #4
jason.woltje added 1 commit 2026-03-13 02:21:10 +00:00
Implements P0-004: authentication package with BetterAuth + Drizzle adapter.

- BetterAuth configured with Drizzle adapter (usePlural for table mapping)
- Email/password authentication enabled
- Role field (admin/member/viewer) as additional user field
- 7-day sessions with daily refresh
- Mounted at /api/auth/* basePath
- createAuth() factory takes Db instance for DI flexibility
- BETTER_AUTH_SECRET and BETTER_AUTH_URL env vars added to .env.example

Verified: auth instance created, handler and API methods confirmed.

Closes #4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 6e3cccc812 into main 2026-03-13 02:21:16 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#68