Browse Source

Fix integer to seconds in remember_otp_session_for_seconds

master
Ladislav Gallay 7 years ago committed by GitHub
parent
commit
8b3c424a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/controllers/devise/two_factor_authentication_controller.rb

2
app/controllers/devise/two_factor_authentication_controller.rb

@ -47,7 +47,7 @@ class Devise::TwoFactorAuthenticationController < DeviseController
if expires_seconds && expires_seconds > 0 if expires_seconds && expires_seconds > 0
cookies.signed[TwoFactorAuthentication::REMEMBER_TFA_COOKIE_NAME] = { cookies.signed[TwoFactorAuthentication::REMEMBER_TFA_COOKIE_NAME] = {
value: "#{resource.class}-#{resource.public_send(Devise.second_factor_resource_id)}", value: "#{resource.class}-#{resource.public_send(Devise.second_factor_resource_id)}",
expires: expires_seconds.from_now expires: expires_seconds.seconds.from_now
} }
end end
end end

Loading…
Cancel
Save