All checks were successful
deploy / deploy (push) Successful in 3m28s
- Create dedicated /admin/account page for user account management - Move email, password, and 2FA settings from /admin/settings - Add Account link to top of admin sidebar navigation - Add TOTP-based two-factor authentication with NimbleTOTP - Add TOTP verification LiveView for login flow - Add AccountController for TOTP session management - Remove Advanced section from settings (duplicated in dev tools) - Remove user email from sidebar footer (replaced by Account link) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
15 lines
449 B
Elixir
15 lines
449 B
Elixir
defmodule Berrypod.Repo.Migrations.AddTotpToUsers do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
alter table(:users) do
|
|
# Encrypted TOTP secret (20 bytes base32-encoded = 32 chars, but encrypted is larger)
|
|
add :totp_secret_encrypted, :binary
|
|
# When 2FA was enabled
|
|
add :totp_enabled_at, :utc_datetime
|
|
# Backup codes (encrypted JSON array of hashed codes)
|
|
add :totp_backup_codes_encrypted, :binary
|
|
end
|
|
end
|
|
end
|