@@ -9,7 +9,7 @@ def passkey_creation_form_for(resource, form_classes: nil, &block)
99 method : :post ,
1010 class : form_classes
1111 ) do |f |
12- tag . webauthn_create ( data : { options_json : create_passkey_options ( resource ) } ) do
12+ tag . webauthn_create ( data : { options_url : options_for_create_passkeys_path ( resource ) } ) do
1313 concat f . hidden_field ( :public_key_credential , data : { webauthn_target : "response" } )
1414 concat capture ( f , &block )
1515 end
@@ -22,7 +22,7 @@ def login_with_passkey_button(text = nil, session_path:, button_classes: nil, fo
2222 method : :post ,
2323 class : form_classes
2424 ) do |f |
25- tag . webauthn_get ( data : { options_json : passkey_authentication_options } ) do
25+ tag . webauthn_get ( data : { options_url : options_for_get_passkeys_path ( resource ) } ) do
2626 concat f . hidden_field ( :public_key_credential , data : { webauthn_target : "response" } )
2727
2828 concat f . button ( text , type : "submit" , class : button_classes , &block )
@@ -36,7 +36,7 @@ def security_key_creation_form_for(resource, form_classes: nil, &block)
3636 method : :post ,
3737 class : form_classes
3838 ) do |f |
39- tag . webauthn_create ( data : { options_json : create_security_key_options ( resource ) } ) do
39+ tag . webauthn_create ( data : { options_url : options_for_create_second_factor_webauthn_credentials_path ( resource ) } ) do
4040 concat f . hidden_field ( :public_key_credential , data : { webauthn_target : "response" } )
4141 concat capture ( f , &block )
4242 end
@@ -49,7 +49,7 @@ def login_with_security_key_button(text = nil, resource:, button_classes: nil, f
4949 method : :post ,
5050 class : form_classes
5151 ) do |f |
52- tag . webauthn_get ( data : { options_json : security_key_authentication_options ( resource ) } ) do
52+ tag . webauthn_get ( data : { options_url : options_for_get_second_factor_webauthn_credentials_path ( resource ) } ) do
5353 concat f . hidden_field ( :public_key_credential , data : { webauthn_target : "response" } )
5454 concat f . button ( text , type : "submit" , class : button_classes , &block )
5555 end
0 commit comments