Module: Unmagic::Passkeys

Defined in:
lib/unmagic/passkeys.rb,
lib/unmagic/passkeys/engine.rb,
lib/unmagic/passkeys/version.rb,
lib/generators/unmagic/passkeys/install_generator.rb

Overview

Passkey (WebAuthn) authentication for Rails. The module methods are thin delegators to the Unmagic::Passkeys::Credential Active Record model so host code reads as Unmagic::Passkeys.authenticate(params).

Defined Under Namespace

Modules: FormHelper, Generators, Holder, Request, WebAuthn Classes: ChallengesController, Credential, Engine

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.authenticate(passkey) ⇒ Object



36
37
38
# File 'lib/unmagic/passkeys.rb', line 36

def authenticate(passkey)
  Credential.authenticate(passkey)
end

.authentication_options(**options) ⇒ Object



32
33
34
# File 'lib/unmagic/passkeys.rb', line 32

def authentication_options(**options)
  Credential.authentication_options(**options)
end

.register(passkey, **attributes) ⇒ Object



28
29
30
# File 'lib/unmagic/passkeys.rb', line 28

def register(passkey, **attributes)
  Credential.register(passkey, **attributes)
end

.registration_options(**options) ⇒ Object



24
25
26
# File 'lib/unmagic/passkeys.rb', line 24

def registration_options(**options)
  Credential.registration_options(**options)
end