1
0

webauthn.rb 1.0 KB

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