Skip to content

Commit

Permalink
Update timeout 15mins
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyranthes03 committed Jan 24, 2025
1 parent c686730 commit 577fae0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/recognizer/accounts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ defmodule Recognizer.Accounts do
if preference != "app" do
current_time = System.system_time(:second)

if current_time - two_factor_issue_time > 60 do
if true or current_time - two_factor_issue_time > 60 do
deliver_two_factor_token(user, seed, preference, current_time)
{:ok, current_time}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ defmodule RecognizerWeb.Accounts.UserSettingsController do
session_time
end


updated_conn = case Accounts.send_new_two_factor_notification(user, settings, issue_time) do
{:ok, update_issue_time} ->
conn = put_session(conn, :two_factor_issue_time, update_issue_time)
Expand Down Expand Up @@ -281,7 +282,7 @@ defmodule RecognizerWeb.Accounts.UserSettingsController do
conn
|> deliver_and_update_token(current_user, method, current_time)
else
if current_time - two_factor_issue_time > 60 do
if true or current_time - two_factor_issue_time > 60 do
conn
|> deliver_and_update_token(current_user, method, current_time)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ defmodule RecognizerWeb.Accounts.UserTwoFactorController do
conn
|> deliver_and_update_token(current_user, method, current_time)
else
if true and current_time - two_factor_issue_time > 60 do
if true or current_time - two_factor_issue_time > 60 do
IO.inspect(two_factor_issue_time, label: "send_two_factor_notification - Two factor issue time")
conn
|> deliver_and_update_token(current_user, method, current_time)
Expand Down

0 comments on commit 577fae0

Please sign in to comment.