Skip to content

Commit 3709aff

Browse files
Merge pull request #845 from cedarcode/rm--remove_after_initialize_action_user_webauthn
Change `webauthn_id` type in `users` [take 1]
2 parents 78e4be2 + 67cdef3 commit 3709aff

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

app/models/user.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ class User < ApplicationRecord
1111
belongs_to :degree
1212
has_many :passkeys, dependent: :destroy
1313

14-
after_initialize do
15-
self.webauthn_id ||= WebAuthn.generate_user_id
16-
end
17-
1814
before_validation :set_default_degree
1915

2016
def self.from_omniauth(auth, cookie)

spec/system/manage_passkeys_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
RSpec.describe 'Manage passkeys' do
44
before do
5-
sign_in create(:user)
5+
sign_in create(:user, webauthn_id: "a1b2c3d4e5f6g7h8")
66
end
77

88
ENV['ENABLE_PASSKEYS'] = 'true'

0 commit comments

Comments
 (0)