Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrliu committed Apr 30, 2023
1 parent d0fccda commit 059ab37
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion apps/consumer-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion apps/consumer-client/pages/examples/webauthn-proof.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/passport-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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",
"@rollbar/react": "^0.11.1",
"@semaphore-protocol/group": "^3.2.3",
"@semaphore-protocol/identity": "^3.2.3",
Expand Down
4 changes: 1 addition & 3 deletions apps/passport-client/src/dispatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { SemaphoreSignaturePCDPackage } from "@pcd/semaphore-signature-pcd";
import { WebAuthnPCDPackage } from "@pcd/webauthn-pcd";
import { Identity } from "@semaphore-protocol/identity";
import { JubJubSignaturePCDPackage } from "jubjub-signature-pcd";
import { createContext } from "react";
import { config } from "./config";
import {
Expand All @@ -25,7 +26,6 @@ import {
import { getPackages } from "./pcdPackages";
import { ZuError, ZuState } from "./state";
import { downloadStorage, uploadStorage } from "./useSyncE2EEStorage";
import { JubJubSignaturePCDPackage } from "jubjub-signature-pcd";

export type Dispatcher = (action: Action) => void;

Expand Down Expand Up @@ -115,7 +115,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 } });
Expand Down Expand Up @@ -253,7 +252,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)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/passport-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/webauthn-pcd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
20 changes: 10 additions & 10 deletions packages/webauthn-pcd/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/webauthn-pcd/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@pcd/tsconfig/server.json",
"extends": "@pcd/tsconfig/ts-library.json",
"include": [".", "test"],
"exclude": ["dist", "build", "node_modules"]
}

0 comments on commit 059ab37

Please sign in to comment.