webauthn_credential_fabricator.rb 252 B

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