diff --git a/.env b/.env index 43605ad..ce8cf55 100644 --- a/.env +++ b/.env @@ -1,6 +1,3 @@ -# just for storage, only used manully -VERCEL_TOKEN=jHo8acroWcT3NjbOqT70DIZz - # Each demo has separate origin due to relying party restrictions (https://webauthn.wtf/how-it-works/relying-party) NEXT_PUBLIC_DEFAULT_EXAMPLE_ORIGIN="http://localhost:3000" NEXT_PUBLIC_UPGRADE_EXAMPLE_ORIGIN="http://localhost:3001" \ No newline at end of file diff --git a/examples/webauthn-default/package.json b/examples/webauthn-default/package.json index 10c5916..d1f3496 100644 --- a/examples/webauthn-default/package.json +++ b/examples/webauthn-default/package.json @@ -3,7 +3,8 @@ "version": "0.0.1", "type": "module", "scripts": { - "dev": "next dev --turbopack -p 3000", + "types-check": "tsc --noEmit -w", + "dev": "next dev --turbopack -p 3000 & yarn types-check", "build": "next build", "start": "next start -p 3000", "lint": "eslint-lint --config=eslint.config.mjs ./src/**/*.{ts,tsx}", @@ -16,7 +17,8 @@ "@workspace/sentry": "workspace:*", "next": "15.0.3", "react": "18.3.1", - "react-dom": "18.3.1" + "react-dom": "18.3.1", + "typescript": "5.7.2" }, "devDependencies": { "@tooling/eslint": "workspace:*", diff --git a/examples/webauthn-upgrade/package.json b/examples/webauthn-upgrade/package.json index 177f4b0..62ee11f 100644 --- a/examples/webauthn-upgrade/package.json +++ b/examples/webauthn-upgrade/package.json @@ -3,7 +3,8 @@ "version": "0.0.1", "type": "module", "scripts": { - "dev": "next dev --turbopack -p 3001", + "types-check": "tsc --noEmit -w", + "dev": "next dev --turbopack -p 3001 & yarn types-check", "build": "next build", "start": "next start -p 3001", "lint": "eslint-lint --config=eslint.config.mjs ./src/**/*.{ts,tsx}", @@ -16,7 +17,8 @@ "@workspace/sentry": "workspace:*", "next": "15.0.3", "react": "18.3.1", - "react-dom": "18.3.1" + "react-dom": "18.3.1", + "typescript": "5.7.2" }, "devDependencies": { "@tooling/eslint": "workspace:*", diff --git a/package.json b/package.json index 8489195..23b2293 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "scripts": { "postinstall": "turbo telemetry disable", - "build": "turbo run build --parallel", + "build": "yarn workspace @workspace/common build && turbo run build --parallel", "dev": "yarn workspace @workspace/common build && turbo run dev --concurrency 100%", "cir-dep": "turbo run cir-dep --parallel", "test:ci": "turbo run test:ci", diff --git a/packages/common/package.json b/packages/common/package.json index 792003d..224b8c0 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -8,7 +8,7 @@ "lint:fix": "yarn lint --fix", "format": "prettier-format", "cir-dep": "check-cir-deps .", - "build": "yarn clean && tsc && tsc-alias", + "build": "tsc && tsc-alias", "clean": "rm -rf dist .cache", "dev": "tsc -w & tsc-alias -w" }, diff --git a/packages/common/src/server/services/challenge-session/index.ts b/packages/common/src/server/services/challenge-session/index.ts index 8295c32..2851104 100644 --- a/packages/common/src/server/services/challenge-session/index.ts +++ b/packages/common/src/server/services/challenge-session/index.ts @@ -10,7 +10,7 @@ import { deleteChallengeSession, getChallengeSession, setChallengeSession } from export type InitializeChallengeSessionProps = { timeout: number; - challenge: ArrayBuffer; + challenge: Uint8Array; } & ( | { type: 'attestation'; @@ -39,6 +39,7 @@ export async function initializeChallengeSession( await setChallengeSession({ ...restProps, id: sessionId, + // @ts-ignore challenge: bufferToBase64URLString(challenge), expiresAt: expiresAt.toISOString(), origin: env.NEXT_PUBLIC_CLIENT_ORIGIN, diff --git a/yarn.lock b/yarn.lock index ab4760c..b6549d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9862,6 +9862,7 @@ __metadata: next: "npm:15.0.3" react: "npm:18.3.1" react-dom: "npm:18.3.1" + typescript: "npm:5.7.2" languageName: unknown linkType: soft @@ -9879,6 +9880,7 @@ __metadata: next: "npm:15.0.3" react: "npm:18.3.1" react-dom: "npm:18.3.1" + typescript: "npm:5.7.2" languageName: unknown linkType: soft