1
0

webauthn.rb 1.0 KB

1234567891011121314151617181920212223242526
  1. # frozen_string_literal: true
  2. WebAuthn.configure do |config|
  3. # This value needs to match `window.location.origin` evaluated by
  4. # the User Agent during registration and authentication ceremonies.
  5. config.origin = "#{Rails.configuration.x.use_https ? 'https' : 'http'}://#{Rails.configuration.x.web_domain}"
  6. # Relying Party name for display purposes
  7. config.rp_name = "Mastodon"
  8. # Optionally configure a client timeout hint, in milliseconds.
  9. # This hint specifies how long the browser should wait for an
  10. # attestation or an assertion response.
  11. # This hint may be overridden by the browser.
  12. # https://www.w3.org/TR/webauthn/#dom-publickeycredentialcreationoptions-timeout
  13. config.credential_options_timeout = 120_000
  14. # You can optionally specify a different Relying Party ID
  15. # (https://www.w3.org/TR/webauthn/#relying-party-identifier)
  16. # if it differs from the default one.
  17. #
  18. # In this case the default would be "auth.example.com", but you can set it to
  19. # the suffix "example.com"
  20. #
  21. # config.rp_id = "example.com"
  22. end