Class: Unmagic::Passkeys::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/unmagic/passkeys/engine.rb

Overview

Integrates the WebAuthn and passkey subsystems into a host Rails app. We deliberately do NOT isolate_namespace: passkeys is an injected concern — has_passkeys goes onto the host's models, the form helpers into its views, and a stateless challenge endpoint into its routes.

Configuration

# config/initializers/passkeys.rb
Unmagic::Passkeys.configure do |config|
config.default_creation_options = { attestation: :none }
config.default_request_options  = { user_verification: :required }
config.routes_prefix            = "/unmagic/passkeys"
end