You need to set extname: false or it appends .js to the end of the JavaScript path, which won't match the one in bin/rails rodauth:routes. You see a HTTP 404.
As a result, it passes through the email address as text, not JSON, and this part in rodauth/features/webauthn.rb fails:
def webauthn_auth_credential_from_form_submission
case auth_data = raw_param(webauthn_auth_param)
when String
begin
auth_data = JSON.parse(auth_data)
rescue
throw_error_reason(:invalid_webauthn_auth_param, invalid_field_error_status, webauthn_auth_param, webauthn_invalid_auth_param_message)
end
The result is a 422 Unprocessable Entity exception on the submission of the form.
I'm on Rails 7.0.4 and there seems to be an extra parameter needed in the template:
You need to set
extname: false
or it appends.js
to the end of the JavaScript path, which won't match the one inbin/rails rodauth:routes
. You see a HTTP 404.As a result, it passes through the email address as text, not JSON, and this part in
rodauth/features/webauthn.rb
fails:The result is a
422 Unprocessable Entity
exception on the submission of the form.Cheers, Nigel (@wtfiwtz)