This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/spec/fabricators/webauthn_credential_fabrica...

8 lines
252 B
Ruby

Fabricator(:webauthn_credential) do
user_id { Fabricate(:user).id }
external_id { Base64.urlsafe_encode64(SecureRandom.random_bytes(16)) }
public_key { OpenSSL::PKey::EC.generate('prime256v1').public_key }
nickname 'USB key'
sign_count 0
end