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
config.unmagic_passkeys.web_authn.default_creation_options = { attestation: :none }
config.unmagic_passkeys.web_authn.default_request_options  = { user_verification: :required }
config.unmagic_passkeys.routes_prefix = "/unmagic/passkeys"