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

Conversation

strouptl
Copy link
Collaborator

@strzibny, I have identified a regression in the new Refreshable functionality, where the "credentials_refreshed_at" session value is not available to the needs_credentials_refresh? method, as Rack converts symbols to strings when storing session values. This causes the user to redirect continually to the otp/credentials/refresh page when trying to view the otp/token page since warden.session[:credentials_refreshed_at] remains nil.

I tried converting the symbols to strings where needed within the helper mehtods (e.g. needs_credentials_refresh?), but then the tests were failing. The reason for this appears to be that the test environment still get/sets symbols as symbols in the Rack session (as opposed to converting them to strings).

A simple solution is to utilize strings again for all get/set methods as before. This PR makes this change, and resolves the redirect issue mentioned above.

Leads:

@strouptl strouptl mentioned this pull request Jun 4, 2024
@strzibny strzibny merged commit c7b15ae into wmlele:master Jun 4, 2024
1 check passed
@strouptl strouptl deleted the refreshable_bug branch June 4, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants