Skip to content

Commit

Permalink
update Refreshable hook and helper methods to get/set values as strin…
Browse files Browse the repository at this point in the history
…gs again (rather than symbols); (#81)
  • Loading branch information
strouptl authored Jun 4, 2024
1 parent ef9d8a0 commit c7b15ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/devise_otp_authenticatable/controllers/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ def otp_fetch_refresh_return_url
end

def otp_refresh_return_url_property
:refresh_return_url
"refresh_return_url"
end

def otp_refresh_property
:credentials_refreshed_at
"credentials_refreshed_at"
end

def otp_scoped_persistence_cookie
Expand Down
2 changes: 1 addition & 1 deletion lib/devise_otp_authenticatable/hooks/refreshable.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# After each sign in, update credentials refreshed at time
Warden::Manager.after_set_user except: :fetch do |record, warden, options|
warden.session[:credentials_refreshed_at] = (Time.now + record.class.otp_credentials_refresh)
warden.session["credentials_refreshed_at"] = (Time.now + record.class.otp_credentials_refresh)
end

0 comments on commit c7b15ae

Please sign in to comment.