Skip to content

Instantly share code, notes, and snippets.

@pedrouid
Created January 30, 2023 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrouid/4ceb1e95e39728ab52121128337315b3 to your computer and use it in GitHub Desktop.
Save pedrouid/4ceb1e95e39728ab52121128337315b3 to your computer and use it in GitHub Desktop.
Verify Enclave
<!-- index.html -->
<html>
<head>
<script src="index.js"></script>
</head>
</html>
// event subscribed by Verify Enclave
window.addEventListener("message", (event) => {
const attestationId = event.data
const origin = event.origin
if(!attestationId) return
fetch(window.location.href, { method: "POST", body: JSON.stringify({ attestationId, origin })})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment