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

implement password_challenge #30

Merged
merged 6 commits into from
Sep 27, 2023
Merged

Conversation

kylekeesling
Copy link
Contributor

Support the Rails 7.1 feature that allows you to provide a password_challenge along with password and password_confirmation params to do a password check prior to updating the record.

Closes #21 and redo of #22.

a new parameter provided by `has_secure_password` that's available in Rails 7.1
@kylekeesling
Copy link
Contributor Author

It's been a minute since I've looked at this, but I'm happy to update it now that 7.1 is on the horizon if you'd still find it useful!

@@ -43,8 +43,8 @@
<% end %>

<div>
<%= label_tag :current_password %>
<%= password_field_tag :current_password, nil, required: true %>
<%= form.label :password_challenge, "Current password" %>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized, I guess we should probably localize these views in another PR.

@excid3 excid3 merged commit f5a442e into excid3:main Sep 27, 2023
8 checks passed
@kylekeesling kylekeesling deleted the password-challenge branch September 27, 2023 12:26
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.

Support authenticate: password_challenge
3 participants