Skip to content

Commit 9438f65

Browse files
feat: make helpers for generating WebAuthn options public methods (#106)
Fixes #98.
1 parent 0910231 commit 9438f65

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- BREAKING!: Our [Form helpers](https://github.com/cedarcode/devise-webauthn/blob/355a6836315439f71265bb368bff4e8067033072/lib/devise/webauthn/helpers/credentials_helper.rb#L7-L58) now use the bundled WebAuthn JS asset now instead of the Stimulus controllers, so they expect it to be included in your application. [#84](https://github.com/cedarcode/devise-webauthn/pull/84) [@santiagorodriguez96]
1414
- Previously generated Stimulus controller for handling WebAuthn client logic are no longer generated.
1515
- Stimulus is no longer needed for this engine to work.
16+
- Make helpers for generating WebAuthn options public methods. [#106](https://github.com/cedarcode/devise-webauthn/pull/106) [@santiagorodriguez96]
1617

1718
### Fixed
1819

lib/devise/webauthn/helpers/credentials_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def login_with_security_key_button(text = nil, resource:, button_classes: nil, f
5757
end
5858
end
5959

60-
private
61-
6260
def create_passkey_options(resource)
6361
@create_passkey_options ||= begin
6462
options = WebAuthn::Credential.options_for_create(
@@ -128,6 +126,8 @@ def security_key_authentication_options(resource)
128126
end
129127
end
130128

129+
private
130+
131131
def resource_human_palatable_identifier
132132
authentication_keys = resource.class.authentication_keys
133133
authentication_keys = authentication_keys.keys if authentication_keys.is_a?(Hash)

0 commit comments

Comments
 (0)