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
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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
|
||||
Reference in New Issue
Block a user