Skip to content

Commit

Permalink
move init embedded key
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed Sep 17, 2024
1 parent 423b76c commit 805cf52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions auth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,8 @@ <h2>Message log</h2>
// In memory spot for the credential to live. We do NOT persist it to localStorage.
var CREDENTIAL_BYTES = null;

await TKHQ.initEmbeddedKey();

document.addEventListener(
"DOMContentLoaded",
async function () {
Expand Down Expand Up @@ -1095,8 +1097,7 @@ <h2>Message log</h2>
console.log("no perms", arg);
}
);

await TKHQ.initEmbeddedKey();

var embeddedKeyJwk = await TKHQ.getEmbeddedKey();
var targetPubBuf = await TKHQ.p256JWKPrivateToPublic(embeddedKeyJwk);
var targetPubHex = TKHQ.uint8arrayToHexString(targetPubBuf);
Expand Down

0 comments on commit 805cf52

Please sign in to comment.