separate account settings from shop settings
All checks were successful
deploy / deploy (push) Successful in 3m28s
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>
This commit is contained in:
14
priv/repo/migrations/20260308085927_add_totp_to_users.exs
Normal file
14
priv/repo/migrations/20260308085927_add_totp_to_users.exs
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user