From a3f4db4631d0ae2d7e7c7e3423209eee98dcde8c Mon Sep 17 00:00:00 2001 From: Richard Liu Date: Sun, 30 Apr 2023 16:42:25 -0700 Subject: [PATCH] pr comments --- apps/consumer-client/package.json | 2 +- .../pages/examples/webauthn-proof.tsx | 1 - apps/passport-client/package.json | 2 +- apps/passport-client/src/dispatch.ts | 2 -- packages/passport-interface/package.json | 2 +- packages/webauthn-pcd/README.md | 4 ++-- packages/webauthn-pcd/package.json | 20 +++++++++---------- packages/webauthn-pcd/tsconfig.json | 2 +- 8 files changed, 16 insertions(+), 19 deletions(-) delete mode 100644 apps/consumer-client/pages/examples/webauthn-proof.tsx diff --git a/apps/consumer-client/package.json b/apps/consumer-client/package.json index 19ea6e82e2..ac42b086be 100644 --- a/apps/consumer-client/package.json +++ b/apps/consumer-client/package.json @@ -16,7 +16,7 @@ "@pcd/pcd-types": "0.4.2", "@pcd/semaphore-group-pcd": "0.4.2", "@pcd/semaphore-identity-pcd": "0.4.2", - "@pcd/webauthn-pcd": "*", + "@pcd/webauthn-pcd": "0.4.2", "@semaphore-protocol/group": "^3.2.3", "@semaphore-protocol/identity": "^3.2.3", "@simplewebauthn/browser": "^7.2.0", diff --git a/apps/consumer-client/pages/examples/webauthn-proof.tsx b/apps/consumer-client/pages/examples/webauthn-proof.tsx deleted file mode 100644 index b454a79bc8..0000000000 --- a/apps/consumer-client/pages/examples/webauthn-proof.tsx +++ /dev/null @@ -1 +0,0 @@ -export default function Page() {} diff --git a/apps/passport-client/package.json b/apps/passport-client/package.json index 1c11b8d7bf..5415fd4801 100644 --- a/apps/passport-client/package.json +++ b/apps/passport-client/package.json @@ -20,7 +20,7 @@ "@pcd/semaphore-group-pcd": "0.4.2", "@pcd/semaphore-identity-pcd": "0.4.2", "@pcd/rln-pcd": "0.3.1", - "@pcd/webauthn-pcd": "*", + "@pcd/webauthn-pcd": "0.4.2", "@rollbar/react": "^0.11.1", "@semaphore-protocol/group": "^3.2.3", "@semaphore-protocol/identity": "^3.2.3", diff --git a/apps/passport-client/src/dispatch.ts b/apps/passport-client/src/dispatch.ts index 6e993138e8..e68c2d711d 100644 --- a/apps/passport-client/src/dispatch.ts +++ b/apps/passport-client/src/dispatch.ts @@ -116,7 +116,6 @@ async function genPassport( email: string, update: ZuUpdate ) { - console.log("Generating"); // Show the NewPassportScreen. // This will save the sema identity & request email verification. update({ pendingAction: { type: "new-passport", email } }); @@ -258,7 +257,6 @@ function resetPassport() { } async function addPCD(state: ZuState, update: ZuUpdate, pcd: SerializedPCD) { - console.log({ state }); if (state.pcds.hasPackage(pcd.type)) { const newPCD = await state.pcds.deserialize(pcd); if (state.pcds.hasPCDWithId(newPCD.id)) { diff --git a/packages/passport-interface/package.json b/packages/passport-interface/package.json index b39f1653a0..46e5097063 100644 --- a/packages/passport-interface/package.json +++ b/packages/passport-interface/package.json @@ -20,7 +20,7 @@ "@semaphore-protocol/group": "^3.2.3", "@semaphore-protocol/identity": "^3.2.3", "@semaphore-protocol/proof": "^3.2.3", - "@pcd/webauthn-pcd": "*", + "@pcd/webauthn-pcd": "0.4.2", "@types/expect": "^24.3.0", "@types/mocha": "^10.0.1", "@types/react": "^18.0.22", diff --git a/packages/webauthn-pcd/README.md b/packages/webauthn-pcd/README.md index 5cd1855013..056aed3a58 100644 --- a/packages/webauthn-pcd/README.md +++ b/packages/webauthn-pcd/README.md @@ -2,10 +2,10 @@ A wrapper around WebAuthn authentication verification as specified by the [W3C protocol](https://www.w3.org/TR/webauthn-2/#sctn-verifying-assertion). WebAuthn enables authentication via a keypair rather than a password, including Face ID, Yubico devices, and many other devices. More options can be configured, such as allowed origin, a unique client ID, and a challenge to be signed. -In contrast to purely software-based PCDs, the WebAuthn PCD allows for actions in the physical world to form the basis of a proof. TH The specific _authorization gesture_ used for registration and authentication can be associated with a hardware device and includes actions like facial recognition, PINs, and fingerprints. With a TPM or secure enclave, the authenticator can have certain security guarantees, such as the private key not being knowable even by the owner of the device/ +In contrast to purely software-based PCDs, the WebAuthn PCD allows for actions in the physical world to form the basis of a proof. The specific _authorization gesture_ used for registration and authentication can be associated with a hardware device and includes actions like facial recognition, PINs, and fingerprints. With a TPM or secure enclave, the authenticator can have certain security guarantees, such as the private key not being knowable even by the owner of the device. Some example use cases: - Proof that I own a particular Yubikey and therefore am a authorized member of an organization. -- Proof that I own an iPhone that has a particular public key, and that I've used Face ID to authenticate. +- Proof that I own an Apple device that has a particular [Passkey](https://developer.apple.com/passkeys/), and that I've used Face ID or Touch ID to authenticate. - Proof that a human has in some way interacted with a hardware device (through fingerprint, facial scan, or otherwise), and therefore not an automated spammer. diff --git a/packages/webauthn-pcd/package.json b/packages/webauthn-pcd/package.json index 9ec7e10cbe..7df271d277 100644 --- a/packages/webauthn-pcd/package.json +++ b/packages/webauthn-pcd/package.json @@ -1,6 +1,6 @@ { "name": "@pcd/webauthn-pcd", - "version": "0.0.10", + "version": "0.4.2", "license": "GPL-3.0-or-later", "main": "./index.ts", "types": "./index.ts", @@ -10,25 +10,25 @@ "build": "tsc --noEmit" }, "dependencies": { - "@pcd/pcd-types": "*", + "@pcd/pcd-types": "0.4.2", "@simplewebauthn/browser": "^7.2.0", "@simplewebauthn/server": "^7.2.0", "@simplewebauthn/typescript-types": "^7.0.0", "json-bigint": "^1.0.0", - "uuid": "^9.0.0" - }, - "devDependencies": { - "@pcd/eslint-config-custom": "*", - "@pcd/tsconfig": "*", + "uuid": "^9.0.0", + "typescript": "^4.5.2", + "@pcd/eslint-config-custom": "0.4.2", + "@pcd/tsconfig": "0.4.2", "@types/expect": "^24.3.0", "@types/json-bigint": "^1.0.1", "@types/mocha": "^10.0.1", - "@types/sinon": "^10.0.14", + "@types/sinon": "^10.0.14" + }, + "devDependencies": { "eslint": "^7.32.0", "mocha": "^10.2.0", "sinon": "^15.0.4", - "ts-mocha": "^10.0.0", - "typescript": "^4.5.2" + "ts-mocha": "^10.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/webauthn-pcd/tsconfig.json b/packages/webauthn-pcd/tsconfig.json index 8b94fc22ff..62b31f9a71 100644 --- a/packages/webauthn-pcd/tsconfig.json +++ b/packages/webauthn-pcd/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@pcd/tsconfig/server.json", + "extends": "@pcd/tsconfig/ts-library.json", "include": [".", "test"], "exclude": ["dist", "build", "node_modules"] }