Skip to content

fix: replace NextAuth references with Better Auth#52

Merged
chriskehayias merged 1 commit intomainfrom
fix/update-nextauth-to-better-auth-refs
Feb 28, 2026
Merged

fix: replace NextAuth references with Better Auth#52
chriskehayias merged 1 commit intomainfrom
fix/update-nextauth-to-better-auth-refs

Conversation

@chriskehayias
Copy link
Contributor

Summary

  • Setup script (scripts/setup.ts): Replace NEXTAUTH_SECRET/NEXTAUTH_URL env vars with BETTER_AUTH_SECRET/BETTER_AUTH_URL, remove unused optional vars (OIDC_PROVIDER_NAME, OIDC_SCOPE, OIDC_WELL_KNOWN_URL, NEXTAUTH_DEBUG), fix step count (10→9), and clean up derived URL logic
  • Test setup (src/test-setup.ts): Update env stubs from NEXTAUTH_* to BETTER_AUTH_* for consistency with the actual auth system
  • Documentation: Update all stale NextAuth product references to Better Auth in docs/OAUTH_LOGOUT_SETUP.md and src/lib/providers/ministry-platform/docs/README.md, fix stale directory tree listing nonexistent auth-provider.ts

Test plan

  • Run npm run setup -- --check to verify the setup script validates correctly with new env var names
  • Run npm run test:run to verify tests pass with updated env stubs
  • Verify .env.local uses BETTER_AUTH_SECRET/BETTER_AUTH_URL (with NEXTAUTH_* fallbacks still supported in src/lib/auth.ts)

🤖 Generated with Claude Code

- scripts/setup.ts: NEXTAUTH_SECRET → BETTER_AUTH_SECRET, NEXTAUTH_URL → BETTER_AUTH_URL
- scripts/setup.ts: remove unused env vars (OIDC_PROVIDER_NAME, OIDC_SCOPE, OIDC_WELL_KNOWN_URL, NEXTAUTH_DEBUG)
- scripts/setup.ts: remove OIDC_WELL_KNOWN_URL from derived URL logic (not consumed by code)
- scripts/setup.ts: rename generateNextAuthSecret() → generateAuthSecret()
- scripts/setup.ts: fix totalSteps 10 → 9, fix duplicate "Step 9" comment
- src/test-setup.ts: update env stubs to BETTER_AUTH_SECRET/BETTER_AUTH_URL
- docs/OAUTH_LOGOUT_SETUP.md: update all NextAuth refs to Better Auth, update status
- src/lib/providers/ministry-platform/docs/README.md: fix stale directory tree, NextAuth → Better Auth

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@chriskehayias chriskehayias merged commit cc7f011 into main Feb 28, 2026
1 check passed
@chriskehayias chriskehayias deleted the fix/update-nextauth-to-better-auth-refs branch February 28, 2026 13:52
@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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