diff --git a/package.json b/package.json index 44c8173..374f3fe 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "build:prod": "npm run clean && rollup -c --environment NODE_ENV:production && tsc --project ./src/tsconfig.json", "deploy": "npm run build && gcloud app deploy dev.yaml --project=try-webauthn", "deploy:prod": "npm run build:prod && gcloud app deploy app.yaml --project=try-webauthn", + "gcp-build": "npm run build:prod", "dev": "NODE_ENV=localhost node dist/server.mjs", "emulator": "firebase emulators:start --only firestore,auth --project try-webauthn --import=./.data --export-on-exit", "start": "node dist/server.mjs" diff --git a/src/libs/webauthn.mts b/src/libs/webauthn.mts index 1576a9f..4e079af 100644 --- a/src/libs/webauthn.mts +++ b/src/libs/webauthn.mts @@ -74,8 +74,9 @@ export const getOrigin = ( const octArray = hashes[i].split(':').map((h) => parseInt(h, 16), ); + const uint8Array = new Uint8Array(octArray.length); // @ts-ignore - const androidHash = base64url.encode(octArray); + const androidHash = isoBase64URL.fromBuffer(uint8Array); origin = `android:apk-key-hash:${androidHash}`; break; }