Files
fizzy/app/models/identity/credential/authenticator.rb
T
Stanko K.R. fbe9252db1 Auto-suggest name for new Passkeys
- Use plain client data json everywhere
- Expose AAGUID and backed_up on Credentials
- Make attestation verifiers configurable
- Auto-suggest names for passkeys and show icons
2026-03-18 11:49:59 +01:00

13 lines
409 B
Ruby

class Identity::Credential::Authenticator < Data.define(:name, :icon)
REGISTRY = Rails.application.config_for(:passkey_aaguids).each_with_object({}) do |(_key, attrs), hash|
authenticator = new(name: attrs[:name], icon: attrs[:icon])
attrs[:aaguids].each { |aaguid| hash[aaguid] = authenticator }
end.freeze
class << self
def find_by_aaguid(aaguid)
REGISTRY[aaguid]
end
end
end