Skip to content

Commit

Permalink
Fix production issues
Browse files Browse the repository at this point in the history
  • Loading branch information
agektmr committed Aug 23, 2024
1 parent 5dac1a6 commit 3199a7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/libs/webauthn.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3199a7a

Please sign in to comment.