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

Explicitly pass WebAuthn credential properties #6975

Merged
merged 2 commits into from Mar 5, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions edb/server/protocol/auth_ext/_static/webauthn-authenticate.js
Expand Up @@ -150,10 +150,12 @@ async function authenticateAssertion(props) {
// Assertion includes raw bytes, so need to be encoded as base64url
// for transmission
const encodedAssertion = {
...props.assertion,
type: props.assertion.type,
id: props.assertion.id,
authenticatorAttachment: props.assertion.authenticatorAttachment,
clientExtensionResults: props.assertion.getClientExtensionResults(),
rawId: encodeBase64Url(new Uint8Array(props.assertion.rawId)),
response: {
...props.assertion.response,
authenticatorData: encodeBase64Url(
new Uint8Array(props.assertion.response.authenticatorData)
),
Expand Down
6 changes: 4 additions & 2 deletions edb/server/protocol/auth_ext/_static/webauthn-register.js
Expand Up @@ -164,10 +164,12 @@ async function registerCredentials(props) {
// Credentials include raw bytes, so need to be encoded as base64url
// for transmission
const encodedCredentials = {
...props.credentials,
type: props.credentials.type,
authenticatorAttachment: props.credentials.authenticatorAttachment,
clientExtensionResults: props.credentials.getClientExtensionResults(),
id: props.credentials.id,
rawId: encodeBase64Url(new Uint8Array(props.credentials.rawId)),
response: {
...props.credentials.response,
attestationObject: encodeBase64Url(
new Uint8Array(props.credentials.response.attestationObject)
),
Expand Down