mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-14 07:12:19 +00:00
fix: add missing passkey flags to make icloud passkeys work
This commit is contained in:
@@ -98,6 +98,8 @@ func verifyRegistrationHandler(c *gin.Context) {
|
|||||||
PublicKey: credential.PublicKey,
|
PublicKey: credential.PublicKey,
|
||||||
Transport: credential.Transport,
|
Transport: credential.Transport,
|
||||||
UserID: user.ID,
|
UserID: user.ID,
|
||||||
|
BackupEligible: credential.Flags.BackupEligible,
|
||||||
|
BackupState: credential.Flags.BackupState,
|
||||||
}
|
}
|
||||||
if err := common.DB.Create(&credentialToStore).Error; err != nil {
|
if err := common.DB.Create(&credentialToStore).Error; err != nil {
|
||||||
utils.UnknownHandlerError(c, err)
|
utils.UnknownHandlerError(c, err)
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ func (u User) WebAuthnCredentials() []webauthn.Credential {
|
|||||||
AttestationType: credential.AttestationType,
|
AttestationType: credential.AttestationType,
|
||||||
PublicKey: credential.PublicKey,
|
PublicKey: credential.PublicKey,
|
||||||
Transport: credential.Transport,
|
Transport: credential.Transport,
|
||||||
|
Flags: webauthn.CredentialFlags{
|
||||||
|
BackupState: credential.BackupState,
|
||||||
|
BackupEligible: credential.BackupEligible,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ type WebauthnCredential struct {
|
|||||||
AttestationType string `json:"attestationType"`
|
AttestationType string `json:"attestationType"`
|
||||||
Transport AuthenticatorTransportList `json:"-"`
|
Transport AuthenticatorTransportList `json:"-"`
|
||||||
|
|
||||||
|
BackupEligible bool `json:"backupEligible"`
|
||||||
|
BackupState bool `json:"backupState"`
|
||||||
|
|
||||||
UserID string
|
UserID string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE webauthn_credentials ADD COLUMN backup_eligible BOOLEAN NOT NULL DEFAULT FALSE;
|
||||||
|
ALTER TABLE webauthn_credentials ADD COLUMN backup_state BOOLEAN NOT NULL DEFAULT FALSE;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE webauthn_credentials DROP COLUMN backup_eligible;
|
||||||
|
ALTER TABLE webauthn_credentials DROP COLUMN backup_state;
|
||||||
Reference in New Issue
Block a user