Skip to content

Commit

Permalink
make requests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed Sep 17, 2024
1 parent f3fe097 commit 423b76c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions auth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,32 @@ <h2>Message log</h2>
document.addEventListener(
"DOMContentLoaded",
async function () {
if (navigator.storage && navigator.storage.persist) {
navigator.storage.persist().then((persistent) => {
if (persistent) {
console.log(
"Storage will not be cleared except by explicit user action"
);
} else {
console.log(
"Storage may be cleared by the UA under storage pressure."
);
}
});
}

var promise = document.requestStorageAccess();
promise.then(
function (arg) {
// Storage access was granted.
console.log("got perms", arg);
},
function (arg) {
// Storage access was denied.
console.log("no perms", arg);
}
);

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

0 comments on commit 423b76c

Please sign in to comment.