nostr verification working

This commit is contained in:
counterweight 2025-02-12 00:44:17 +01:00
parent f42ae5fc1d
commit 19667807bb
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
8 changed files with 258 additions and 7 deletions

View file

@ -9,9 +9,7 @@ async function login() {
if (!challengeResponse.ok) throw new Error("Failed to fetch challenge");
const { challenge } = await challengeResponse.json();
console.log(`Received challenge: ${challenge}`);
} catch (error) { }
/* const pubkey = await window.nostr.getPublicKey();
const pubkey = await window.nostr.getPublicKey();
const event = {
kind: 22242,
@ -29,6 +27,9 @@ async function login() {
body: JSON.stringify(signedEvent),
});
} catch (error) { }
/*
if (!verifyResponse.ok) throw new Error("Verification failed");
const verifyResult = await verifyResponse.json();