Skip to content

Commit 2311b64

Browse files
Merge branch 'master' into sr--add-missing-breaking-changes
2 parents bbf8666 + ef58c35 commit 2311b64

18 files changed

Lines changed: 172 additions & 64 deletions

File tree

.github/workflows/ruby.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
uses: ruby/setup-ruby@v1
8080
with:
8181
ruby-version: ${{ matrix.ruby }}
82+
rubygems: latest
8283
bundler-cache: true
8384

8485
- name: Run tests

Appraisals

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ appraise "rails-7_1" do
2222
gem "capybara", "~> 3.39"
2323
gem "importmap-rails", "~> 2.0"
2424
gem "pry-byebug", "~> 3.10"
25-
gem "psych", "~> 4.0"
2625
gem "rack", "~> 2.2"
2726
gem "rspec-rails", "~> 7.1"
2827
gem "sqlite3", "~> 1.7"

CHANGELOG.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,37 @@
22

33
## Unreleased
44

5+
### Added
6+
7+
- Dispatch webauthn:unsupported for browsers missing parseOptionsFromJSON [#127](https://github.com/cedarcode/devise-webauthn/pull/127) [@santiagorodriguez96]
8+
59
### Changed
610

11+
- Change `webauthn_id` generation from `after_initialize` to `before_validation` and add a data backfill to the `webauthn_id` migration generator for existing records. [@santiagorodriguez96]
712
- 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]
813
- BREAKING!: Remove helpers for generating WebAuthn options. [#106](https://github.com/cedarcode/devise-webauthn/pull/115) [@nicolastemciuc]
14+
- BREAKING!: Replace `form_classes:` keyword argument with direct keyword arguments 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`). All options are delegated to `form_with`, allowing you to pass any HTML attributes or form options directly. [@RenzoMinelli]
15+
```erb
16+
<%# Before %>
17+
<%= passkey_creation_form_for(:user, form_classes: "my-class") do |form| %>
18+
...
19+
<% end %>
20+
21+
<%# After %>
22+
<%= passkey_creation_form_for(:user, class: "my-class", id: "my-form", data: { turbo: false }) do |form| %>
23+
...
24+
<% end %>
25+
```
926

10-
- 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:
27+
- 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:
1128
```erb
1229
<%# Before %>
13-
<%%= login_with_passkey_button(:user, "Log in with passkeys") %>
30+
<%= login_with_passkey_button(:user, "Log in with passkeys") %>
1431
1532
<%# After %>
16-
<%%= login_with_passkey_form_for(:user) do |form| %>
17-
<%%= form.submit "Log in with passkeys" %>
18-
<%% end %>
33+
<%= login_with_passkey_form_for(:user) do |form| %>
34+
<%= form.submit "Log in with passkeys" %>
35+
<% end %>
1936
```
2037

2138
### Fixed

app/assets/javascript/devise/webauthn.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ function isWebAuthnSupported() {
33
navigator.credentials &&
44
navigator.credentials.create &&
55
navigator.credentials.get &&
6-
window.PublicKeyCredential
6+
window.PublicKeyCredential &&
7+
PublicKeyCredential.parseCreationOptionsFromJSON &&
8+
PublicKeyCredential.parseRequestOptionsFromJSON
79
);
810
}
911

gemfiles/devise_5_0.gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ gem "rubocop-rails", "~> 2.32"
1818
gem "rubocop-rspec", "~> 3.6"
1919
gem "selenium-webdriver"
2020
gem "sqlite3", ">= 1.6", "!= 1.7.0", "!= 1.7.1", "!= 1.7.2", "!= 1.7.3"
21-
gem "stimulus-rails", "~> 1.3"
2221

2322
install_if -> { RUBY_VERSION < "3.0" } do
2423
gem "rack", "~> 2.2"

gemfiles/rails_7_1.gemfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ gem "rubocop-rails", "~> 2.32"
1818
gem "rubocop-rspec", "~> 3.6"
1919
gem "selenium-webdriver"
2020
gem "sqlite3", "~> 1.7"
21-
gem "stimulus-rails", "~> 1.3"
22-
gem "psych", "~> 4.0"
2321
gem "rack", "~> 2.2"
2422

2523
gemspec path: "../"

gemfiles/rails_7_2.gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ gem "rubocop-rails", "~> 2.32"
1818
gem "rubocop-rspec", "~> 3.6"
1919
gem "selenium-webdriver"
2020
gem "sqlite3", "~> 2.7"
21-
gem "stimulus-rails", "~> 1.3"
2221

2322
gemspec path: "../"

gemfiles/rails_8_0.gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ gem "rubocop-rails", "~> 2.32"
1818
gem "rubocop-rspec", "~> 3.6"
1919
gem "selenium-webdriver"
2020
gem "sqlite3", "~> 2.7"
21-
gem "stimulus-rails", "~> 1.3"
2221

2322
gemspec path: "../"

gemfiles/rails_8_1.gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ gem "rubocop-rails", "~> 2.32"
1818
gem "rubocop-rspec", "~> 3.6"
1919
gem "selenium-webdriver"
2020
gem "sqlite3", "~> 2.7"
21-
gem "stimulus-rails", "~> 1.3"
2221

2322
gemspec path: "../"

gemfiles/rails_edge.gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ gem "rubocop-rails", "~> 2.32"
1818
gem "rubocop-rspec", "~> 3.6"
1919
gem "selenium-webdriver"
2020
gem "sqlite3", "~> 2.7"
21-
gem "stimulus-rails", "~> 1.3"
2221

2322
gemspec path: "../"

0 commit comments

Comments
 (0)