lib/rodauth/features/json.rb in rodauth-2.26.1 vs lib/rodauth/features/json.rb in rodauth-2.27.0
- old
+ new
@@ -105,20 +105,20 @@
end
def before_webauthn_auth_route
super if defined?(super)
if use_json? && !param_or_nil(webauthn_auth_param)
- cred = webauth_credential_options_for_get
+ cred = webauthn_credential_options_for_get
json_response[webauthn_auth_param] = cred.as_json
json_response[webauthn_auth_challenge_param] = cred.challenge
json_response[webauthn_auth_challenge_hmac_param] = compute_hmac(cred.challenge)
end
end
def before_webauthn_login_route
super if defined?(super)
if use_json? && !param_or_nil(webauthn_auth_param) && account_from_login(param(login_param))
- cred = webauth_credential_options_for_get
+ cred = webauthn_credential_options_for_get
json_response[webauthn_auth_param] = cred.as_json
json_response[webauthn_auth_challenge_param] = cred.challenge
json_response[webauthn_auth_challenge_hmac_param] = compute_hmac(cred.challenge)
end
end