Skip to content

Commit

Permalink
Reduce 2faVerified cookie expire time to 5 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
syeopite committed Jul 25, 2023
1 parent 65c7362 commit 7d5e809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/invidious/routes/account.cr
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ module Invidious::Routes::Account
end

if CONFIG.domain
env.response.cookies["2faVerified"] = HTTP::Cookie.new(name: "2faVerified", domain: "#{CONFIG.domain}", value: "1", expires: Time.utc + 1.hours, secure: secure, http_only: true, path: "/")
env.response.cookies["2faVerified"] = HTTP::Cookie.new(name: "2faVerified", domain: "#{CONFIG.domain}", value: "1", expires: Time.utc + 5.minutes, secure: secure, http_only: true, path: "/")
else
env.response.cookies["2faVerified"] = HTTP::Cookie.new(name: "2faVerified", value: "1", expires: Time.utc + 1.hours, secure: secure, http_only: true, path: "/")
env.response.cookies["2faVerified"] = HTTP::Cookie.new(name: "2faVerified", value: "1", expires: Time.utc + 5.minutes, secure: secure, http_only: true, path: "/")
end
end

Expand Down

0 comments on commit 7d5e809

Please sign in to comment.