Created
January 30, 2023 17:52
-
-
Save pedrouid/4ceb1e95e39728ab52121128337315b3 to your computer and use it in GitHub Desktop.
Verify Enclave
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- index.html --> | |
<html> | |
<head> | |
<script src="index.js"></script> | |
</head> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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