Skip to content

Commit 3a34b82

Browse files
committed
update changelog
1 parent 2b41f2a commit 3a34b82

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,28 @@
66

77
- Options for getting or creating passkeys and security keys are now served by dedicated Rails controllers and retrieved via JavaScript fetch requests. [#73](https://github.com/cedarcode/devise-webauthn/pull/73) [@nicolastemciuc]
88
- BREAKING!: Remove helpers for generating WebAuthn options. [#106](https://github.com/cedarcode/devise-webauthn/pull/115) [@nicolastemciuc]
9+
- BREAKING: Replace `form_classes:` keyword argument with `html_options:` in all form helper methods (`passkey_creation_form_for`, `login_with_passkey_form_for`, `security_key_creation_form_for`, `login_with_security_key_form_for`). This allows passing any HTML attributes to the form, not just CSS classes. [@RenzoMinelli]
10+
```erb
11+
<%# Before %>
12+
<%= passkey_creation_form_for(:user, form_classes: "my-class") do |form| %>
13+
...
14+
<% end %>
15+
16+
<%# After %>
17+
<%= passkey_creation_form_for(:user, html_options: { class: "my-class", id: "my-form" }) do |form| %>
18+
...
19+
<% end %>
20+
```
921

1022
- 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:
1123
```erb
1224
<%# Before %>
13-
<%%= login_with_passkey_button(:user, "Log in with passkeys") %>
25+
<%= login_with_passkey_button(:user, "Log in with passkeys") %>
1426
1527
<%# After %>
16-
<%%= login_with_passkey_form_for(:user) do |form| %>
17-
<%%= form.submit "Log in with passkeys" %>
18-
<%% end %>
28+
<%= login_with_passkey_form_for(:user) do |form| %>
29+
<%= form.submit "Log in with passkeys" %>
30+
<% end %>
1931
```
2032

2133
### Fixed

0 commit comments

Comments
 (0)