Skip to content

Commit e6f4ed3

Browse files
build: bump devise-webauthn to v0.3.0 (#18)
* build(deps): bump `devise-webauthn` from `0.2.2` to `0.3.0` * refactor: use bundled webauthn js from `devise-webauthn` Remove `stimulus` and `devise-webauthn` generated stimulus controllers. * chore: update methods used for redirecting after creating or updating a security key
1 parent f3cf5fe commit e6f4ed3

File tree

8 files changed

+11
-58
lines changed

8 files changed

+11
-58
lines changed

Gemfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ gem "importmap-rails", "~> 2.2"
2525

2626
gem "turbo-rails", "~> 2.0"
2727

28-
gem "devise-webauthn", "~> 0.2.2"
29-
30-
gem "stimulus-rails", "~> 1.3"
28+
gem "devise-webauthn", "~> 0.3.0"
3129

3230
group :development, :deploy do
3331
gem "kamal", "~> 2.10"

Gemfile.lock

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ GEM
9898
railties (>= 4.1.0)
9999
responders
100100
warden (~> 1.2.3)
101-
devise-webauthn (0.2.2)
102-
devise (~> 4.9)
101+
devise-webauthn (0.3.0)
102+
devise (>= 4.9)
103103
webauthn (~> 3.0)
104104
dotenv (3.2.0)
105105
drb (2.2.3)
@@ -270,8 +270,6 @@ GEM
270270
net-sftp (>= 2.1.2)
271271
net-ssh (>= 2.8.0)
272272
ostruct
273-
stimulus-rails (1.3.4)
274-
railties (>= 6.0.0)
275273
stringio (3.2.0)
276274
tailwindcss-rails (4.4.0)
277275
railties (>= 7.0.0)
@@ -327,15 +325,14 @@ PLATFORMS
327325

328326
DEPENDENCIES
329327
devise (~> 4.9)
330-
devise-webauthn (~> 0.2.2)
328+
devise-webauthn (~> 0.3.0)
331329
importmap-rails (~> 2.2)
332330
kamal (~> 2.10)
333331
propshaft
334332
pry-byebug
335333
puma (>= 5.0)
336334
rails (~> 8.1.2)
337335
sqlite3 (>= 2.1)
338-
stimulus-rails (~> 1.3)
339336
tailwindcss-rails (~> 4.4)
340337
turbo-rails (~> 2.0)
341338
tzinfo-data

app/controllers/users/second_factor_webauthn_credentials_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
class Users::SecondFactorWebauthnCredentialsController < Devise::SecondFactorWebauthnCredentialsController
44
private
55

6-
def after_update_path
6+
def after_create_path
7+
root_path
8+
end
9+
10+
def after_destroy_path
711
root_path
812
end
913
end

app/javascript/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
22
import "@hotwired/turbo-rails"
3-
import "controllers"
3+
import "devise/webauthn"

app/javascript/controllers/application.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/javascript/controllers/index.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/javascript/controllers/webauthn_credentials_controller.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

config/importmap.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
pin "application"
44
pin "@hotwired/turbo-rails", to: "turbo.min.js"
5-
pin "@hotwired/stimulus", to: "stimulus.min.js"
6-
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js"
7-
pin_all_from "app/javascript/controllers", under: "controllers"
5+
pin "devise/webauthn", to: "devise/webauthn.js"

0 commit comments

Comments
 (0)