Encrypt existing plaintext Account tokens #352
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 1c - Security Foundations
Problem
OAuth tokens (accessToken, refreshToken, idToken) in the Account table are stored as plaintext in PostgreSQL. If the database is compromised, all OAuth credentials are exposed. The Account model is managed by BetterAuth, which reads and writes these fields directly.
Additionally, ENCRYPTION_KEY is not documented in the root .env.example, so developers may not configure it.
Requirements
Implementation Notes
Files
Acceptance Criteria
Dependencies
Refs #346