fix auth event invalidation
This commit is contained in:
parent
4691f4ea9e
commit
aea4ee5851
1 changed files with 1 additions and 3 deletions
|
@ -23,9 +23,7 @@ export async function validateAuthEvent(
|
|||
if (event.created_at < last30Seconds) return false;
|
||||
const challengeTag = event.tags.find((tag) => tag[0] === "challenge")?.[1];
|
||||
if (challengeTag !== challenge) return false;
|
||||
if(!await isPubkeyAllowed(event))
|
||||
return false;
|
||||
return await isKindAllowed(event);
|
||||
return isPubkeyAllowed(event);
|
||||
}
|
||||
|
||||
export async function isPubkeyAllowed(event: Event): Promise<boolean> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue