mirror of
https://github.com/vitorpamplona/Nostryfied.git
synced 2025-06-04 08:22:04 +00:00
Testing auth
This commit is contained in:
parent
967d29ef2f
commit
3297f9d501
@ -62,7 +62,7 @@
|
||||
type="text"
|
||||
id="relaySet"
|
||||
name="relaySet"
|
||||
placeholder="wss://nos.lol"
|
||||
placeholder="Force relays or blank to use your list: wss://nos.lol"
|
||||
style="width: 180px"
|
||||
value="" />
|
||||
</p>
|
||||
|
@ -420,13 +420,8 @@ function sha256Hex(string) {
|
||||
|
||||
async function signNostrAuthEvent(relay, auth_challenge) {
|
||||
try {
|
||||
|
||||
if (!window.nostr) {
|
||||
throw "Nostr extension not loaded or available"
|
||||
}
|
||||
|
||||
let msg = {
|
||||
kind: 22243, // NIP-42++
|
||||
kind: 22243,
|
||||
content: "",
|
||||
tags: [
|
||||
["relay", relay],
|
||||
@ -434,6 +429,8 @@ async function signNostrAuthEvent(relay, auth_challenge) {
|
||||
],
|
||||
};
|
||||
|
||||
console.log(msg)
|
||||
|
||||
// set msg fields
|
||||
msg.created_at = Math.floor((new Date()).getTime() / 1000);
|
||||
msg.pubkey = await window.nostr.getPublicKey();
|
||||
|
Loading…
x
Reference in New Issue
Block a user