diff --git a/lib/kmxgit/user_manager/user.ex b/lib/kmxgit/user_manager/user.ex
index d327d34..78910f5 100644
--- a/lib/kmxgit/user_manager/user.ex
+++ b/lib/kmxgit/user_manager/user.ex
@@ -263,8 +263,8 @@ defmodule Kmxgit.UserManager.User do
end
defp verify_totp_last(changeset) do
- otp_last = changeset |> get_field(:otp_last) |> Integer.to_string()
- if totp_verify(changeset.data, otp_last) do
+ totp_last = changeset |> get_field(:totp_last) |> Integer.to_string()
+ if totp_verify(changeset.data, totp_last) do
changeset
else
changeset