fix: use correct signature for create_totp_device/3

Function signature is create_totp_device(user_id, device_name, secret) with
separate arguments, not create_totp_device(user, map).

Tested locally and confirmed working.
This commit is contained in:
Graham McIntire 2026-03-08 12:42:17 -05:00
parent f473d1e920
commit 97ba2b045b
No known key found for this signature in database

View file

@ -28,11 +28,8 @@ test_totp_secret = "JBSWY3DPEHPK3PXP"
|> Repo.update()
# Enable TOTP for the user
{:ok, _device} =
Accounts.create_totp_device(user, %{
name: "E2E Test Authenticator",
secret: test_totp_secret
})
{:ok, _device, _secret} =
Accounts.create_totp_device(user.id, "E2E Test Authenticator", test_totp_secret)
IO.puts("✅ Created test user: #{test_email}")
IO.puts(" Password: #{test_password}")