From 7ee7e0cfff01ac528baf876c88590d9bb23fe955 Mon Sep 17 00:00:00 2001 From: reya Date: Tue, 23 Jan 2024 13:47:15 +0700 Subject: [PATCH] fix again --- src/daemon/web/authorize.ts | 4 ++-- templates/createAccount.handlebar | 2 +- templates/login.handlebar | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/daemon/web/authorize.ts b/src/daemon/web/authorize.ts index 4bf3ee0..95798c0 100644 --- a/src/daemon/web/authorize.ts +++ b/src/daemon/web/authorize.ts @@ -49,7 +49,7 @@ export async function authorizeRequestWebHandler(request, reply) { const record = await getAndValidateStateOfRequest(request); const url = new URL(request.url, `http://${request.headers.host}`); const callbackUrl = url.searchParams.get("callbackUrl"); - const baseUrl = new URL(request.url).pathname?.split('/')?.[1] || ''; + const baseUrl = new URL(request.url).pathname?.split('/')?.[1] || '/'; const method = record.method; let nip05: string | undefined; @@ -164,7 +164,7 @@ export async function processRegistrationWebHandler(request, reply) { try { const record = await getAndValidateStateOfRequest(request); const body = request.body; - const baseUrl = new URL(request.url).pathname?.split('/')?.[1] || ''; + const baseUrl = new URL(request.url).pathname?.split('/')?.[1] || '/'; // we serialize the payload again and store it // along with the allowed flag diff --git a/templates/createAccount.handlebar b/templates/createAccount.handlebar index fe578e1..65a1ceb 100644 --- a/templates/createAccount.handlebar +++ b/templates/createAccount.handlebar @@ -87,7 +87,7 @@
{{#if error}} diff --git a/templates/login.handlebar b/templates/login.handlebar index 446e2d4..cdee223 100644 --- a/templates/login.handlebar +++ b/templates/login.handlebar @@ -52,7 +52,7 @@