Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @simplewebauthn/server to v10 #5705

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@logto/shared": "workspace:^3.1.0",
"@silverhand/essentials": "^2.9.0",
"@silverhand/slonik": "31.0.0-beta.2",
"@simplewebauthn/server": "^9.0.0",
"@simplewebauthn/server": "^10.0.0",
"@withtyped/client": "^0.8.7",
"camelcase": "^8.0.0",
"camelcase-keys": "^9.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/routes/interaction/utils/webauthn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
const options: GenerateRegistrationOptionsOpts = {
rpName: rpId,
rpID: rpId,
userID: id,
userID: Uint8Array.from(Buffer.from(id)),
userName: getUserDisplayName({ username, primaryEmail, primaryPhone }) ?? 'Unnamed User',
timeout: 60_000,
attestationType: 'none',
Expand All @@ -47,7 +47,7 @@
verification.type === MfaFactor.WebAuthn
)
.map(({ credentialId, transports }) => ({
id: Uint8Array.from(Buffer.from(credentialId, 'base64')),
id: credentialId,

Check warning on line 50 in packages/core/src/routes/interaction/utils/webauthn.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/routes/interaction/utils/webauthn.ts#L50

Added line #L50 was not covered by tests
type: 'public-key',
transports,
})),
Expand Down Expand Up @@ -99,7 +99,7 @@
const options: GenerateAuthenticationOptionsOpts = {
timeout: 60_000,
allowCredentials: webAuthnVerifications.map(({ credentialId, transports }) => ({
id: isoBase64URL.toBuffer(credentialId),
id: credentialId,
type: 'public-key',
transports,
})),
Expand Down Expand Up @@ -151,7 +151,7 @@
expectedRPID: rpId,
authenticator: {
credentialPublicKey: isoBase64URL.toBuffer(publicKey),
credentialID: isoBase64URL.toBuffer(credentialId),
credentialID: credentialId,
counter,
transports,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const verifyBindWebAuthn = async (

return {
type,
credentialId: isoBase64URL.fromBuffer(credentialID),
credentialId: credentialID,
publicKey: isoBase64URL.fromBuffer(credentialPublicKey),
counter,
agent: userAgent,
Expand Down
Loading
Loading