@@ -53,7 +53,7 @@ type WebAuthnCredential struct {
5353 PublicKey []byte `json:"-" db:"public_key"`
5454 AttestationType string `json:"attestation_type" db:"attestation_type"`
5555 AAGUID * uuid.UUID `json:"aaguid,omitempty" db:"aaguid"`
56- SignCount int64 `json:"sign_count" db:"sign_count"`
56+ SignCount uint32 `json:"sign_count" db:"sign_count"`
5757 Transports WebAuthnTransports `json:"transports" db:"transports"`
5858 BackupEligible bool `json:"backup_eligible" db:"backup_eligible"`
5959 BackedUp bool `json:"backed_up" db:"backed_up"`
@@ -76,7 +76,7 @@ func NewWebAuthnCredential(userID uuid.UUID, cred *webauthn.Credential, friendly
7676 CredentialID : cred .ID ,
7777 PublicKey : cred .PublicKey ,
7878 AttestationType : cred .AttestationType ,
79- SignCount : int64 ( cred .Authenticator .SignCount ) ,
79+ SignCount : cred .Authenticator .SignCount ,
8080 Transports : WebAuthnTransports (cred .Transport ),
8181 BackupEligible : cred .Flags .BackupEligible ,
8282 BackedUp : cred .Flags .BackupState ,
@@ -105,7 +105,7 @@ func (pc *WebAuthnCredential) ToWebAuthnCredential() webauthn.Credential {
105105 BackupState : pc .BackedUp ,
106106 },
107107 Authenticator : webauthn.Authenticator {
108- SignCount : uint32 ( pc .SignCount ) ,
108+ SignCount : pc .SignCount ,
109109 },
110110 }
111111
@@ -154,7 +154,7 @@ func CountWebAuthnCredentialsByUserID(conn *storage.Connection, userID uuid.UUID
154154 return count , nil
155155}
156156
157- func (pc * WebAuthnCredential ) UpdateSignCount (tx * storage.Connection , signCount int64 ) error {
157+ func (pc * WebAuthnCredential ) UpdateSignCount (tx * storage.Connection , signCount uint32 ) error {
158158 pc .SignCount = signCount
159159 return tx .UpdateOnly (pc , "sign_count" , "updated_at" )
160160}
0 commit comments