Skip to content

Commit e354924

Browse files
Merge pull request #390 from agchou/patch-1
Update advanced_configuration.md
2 parents fe5aa1e + a77b3e4 commit e354924

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/advanced_configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ end
7373

7474
options = relying_party.options_for_registration(
7575
user: { id: user.webauthn_id, name: user.name },
76-
exclude: user.credentials.map { |c| c.webauthn_id }
76+
exclude: user.credentials.map { |c| c.external_id }
7777
)
7878

7979
# Store the newly generated challenge somewhere so you can have it
@@ -106,7 +106,7 @@ begin
106106

107107
# Store Credential ID, Credential Public Key and Sign Count for future authentications
108108
user.credentials.create!(
109-
webauthn_id: webauthn_credential.id,
109+
external_id: webauthn_credential.id,
110110
public_key: webauthn_credential.public_key,
111111
sign_count: webauthn_credential.sign_count
112112
)
@@ -150,7 +150,7 @@ begin
150150
session[:authentication_challenge]
151151
) do |webauthn_credential|
152152
# the returned object needs to respond to #public_key and #sign_count
153-
user.credentials.find_by(webauthn_id: webauthn_credential.id)
153+
user.credentials.find_by(external_id: webauthn_credential.id)
154154
end
155155

156156
# Update the stored credential sign count with the value from `webauthn_credential.sign_count`

0 commit comments

Comments
 (0)