Files
fizzy/app/models/identity/credential.rb
T
Stanko K.R. 6c58fd9bdd Implement Passkey registration
- Create Identity credentials
- Add management UI and registration flow
2026-03-18 11:48:52 +01:00

14 lines
317 B
Ruby

class Identity::Credential < ApplicationRecord
belongs_to :identity
serialize :transports, coder: JSON, type: Array, default: []
def to_public_key_credential
ActionPack::WebAuthn::PublicKeyCredential.new(
id: credential_id,
public_key: public_key,
transports: transports
)
end
end