Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Refreshable hook and helper methods to get/set values as strings again #81

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading