auth98: fix nsec flow

This commit is contained in:
Alex Gleason
2023-09-08 18:29:26 -05:00
parent 527e276340
commit dcc9d05ee5
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ import {
validateAuthEvent,
} from '@/utils/nip98.ts';
import { localRequest } from '@/utils/web.ts';
import { signNostrConnect } from '@/sign.ts';
import { signEvent } from '@/sign.ts';
import { findUser, User } from '@/db/users.ts';
/**
@@ -63,7 +63,7 @@ function matchesRole(user: User, role: UserRole): boolean {
async function obtainProof(c: AppContext, opts?: ParseAuthRequestOpts) {
const req = localRequest(c);
const reqEvent = await buildAuthEventTemplate(req, opts);
const resEvent = await signNostrConnect(reqEvent, c);
const resEvent = await signEvent(reqEvent, c);
const result = await validateAuthEvent(req, resEvent, opts);
if (result.success) {