Skip to content

feat: Better auth#40

Merged
twk3 merged 2 commits into
mainfrom
feat/better-auth
Mar 24, 2026
Merged

feat: Better auth#40
twk3 merged 2 commits into
mainfrom
feat/better-auth

Conversation

@twk3
Copy link
Copy Markdown
Contributor

@twk3 twk3 commented Mar 24, 2026

Commit Description

  • Support multiple users in onPrem via username-password instead of trusted jwt
  • Enable password creation for root user at setup time

Summary

Migrates authentication from JWT-based tokens to Better Auth, adding support for root user password configuration and new email settings.

Changes

  • Authentication Migration: Replaced apiJwtToken configuration with betterAuth secret configuration

    • Removed JWT_SECRET and JWT_SECRET_EXPIRY environment variables
    • Added BETTER_AUTH_SECRET and BETTER_AUTH_ENABLED environment variables
    • Added BETTER_AUTH_URL pointing to the app host
  • Root User Password: Added support for configuring root user password via Kubernetes secret

    • New currents.rootUser.password.secretName and currents.rootUser.password.key values
    • Injects ON_PREM_PASSWORD environment variable when configured
  • Email Configuration: Added new optional email settings

    • inviteFrom - Custom sender address for invitation emails
    • inviteBcc - BCC address for invitation emails
    • reportsBcc - BCC address for automated report emails
    • inviteExpirationDays - Configurable invitation link expiration
    • linksBaseUrl - Custom base URL for email links
  • Documentation: Updated developer guide and EKS quickstart with new secret creation commands

    • Increased recommended secret lengths from 32 to 64 characters for auth secrets

Breaking Changes

  • currents.apiJwtToken.secretNamecurrents.betterAuth.secretName
  • currents.apiJwtToken.keycurrents.betterAuth.key (default changed from token to secret)
  • Removed currents.apiJwtToken.expiry (no longer applicable)

Migration

Existing deployments need to:

  1. Create a new currents-better-auth secret with a 64-character secret
  2. Create a new currents-root-user secret with the admin password
  3. Update Helm values to use betterAuth instead of apiJwtToken

twk3 added 2 commits March 24, 2026 09:40
- Support multiple users in onPrem via username-password instead of trusted jwt
- Enable password creation for root user at setup time
Copy link
Copy Markdown
Contributor Author

@twk3 twk3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in local K8S cluster.

Still needs to be verified in EKS prior to release

@twk3 twk3 merged commit 6b5ff24 into main Mar 24, 2026
2 checks passed
@twk3 twk3 deleted the feat/better-auth branch March 24, 2026 22:36
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