Stop generating button inside login helper method#112
Merged
RenzoMinelli merged 9 commits intomasterfrom Feb 10, 2026
Merged
Conversation
Comment on lines
+8
to
+17
| - BREAKING: `login_with_passkey_button` and `login_with_security_key_button` helpers have been renamed to `login_with_passkey_form_for` and `login_with_security_key_form_for`. They now take a block and no longer generate the submit button automatically. You need to explicitly add the button inside the block: | ||
| ```erb | ||
| <%# Before %> | ||
| <%%= login_with_passkey_button("Log in with passkeys", session_path: user_session_path) %> | ||
|
|
||
| <%# After %> | ||
| <%%= login_with_passkey_form_for(session_path: user_session_path) do |form| %> | ||
| <%%= form.submit "Log in with passkeys" %> | ||
| <%% end %> | ||
| ``` |
Collaborator
There was a problem hiding this comment.
Perhaps it's worth noting that now users can add whatever they want inside the form (like a remember_me checkbox?
This was referenced Jan 30, 2026
…button
BREAKING CHANGE: `login_with_passkey_button` and `login_with_security_key_button`
helpers have been renamed to `login_with_passkey_form_for` and
`login_with_security_key_form_for`. They now take a block and no longer
generate the submit button automatically.
Before:
<%= login_with_passkey_button("Log in", session_path: path) %>
After:
<%= login_with_passkey_form_for(session_path: path) do |form| %>
<%= form.submit "Log in" %>
<% end %>
This gives developers full control over button styling and form content.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
d544026 to
aa83641
Compare
santiagorodriguez96
approved these changes
Feb 10, 2026
Collaborator
There was a problem hiding this comment.
Please add it to your locally ignore files 🙂
| end | ||
|
|
||
| before do | ||
| Rails.application.try(:reload_routes_unless_loaded) |
Collaborator
There was a problem hiding this comment.
What do you think about only running this if in Rails 8 and Devise 4?
Suggested change
| Rails.application.try(:reload_routes_unless_loaded) | |
| require 'devise/version' | |
| if Rails::VERSION::MAJOR >= 8 && Devise::VERSION < '5' | |
| Rails.application.reload_routes_unless_loaded | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update login helper method to stop generating the button inside the form and require devs to do so
This gives developers full control over button styling and form content.