Commit d9d094bafce65fe604f1dcf6a40d209659420f9f

Thomas de Grivel 2022-03-26T08:23:47

fix totp login

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/kmxgit_web/controllers/user_session_controller.ex b/lib/kmxgit_web/controllers/user_session_controller.ex
index 0ba4901..6e77057 100644
--- a/lib/kmxgit_web/controllers/user_session_controller.ex
+++ b/lib/kmxgit_web/controllers/user_session_controller.ex
@@ -18,7 +18,7 @@ defmodule KmxgitWeb.UserSessionController do
       %{"login" => login, "password" => password} = user_params
       UserManager.get_user_by_login_and_password(login, password)
     end
-    totp = user_params["totp_last"]
+    totp = user_params["totp"]
     if user do
       if user.totp_last == 0 || totp && UserManager.verify_user_totp(user, totp) do
         UserAuth.log_in_user(conn, user, user_params)