From a5b59c004eab9ce2ce41e666a9b27f88441b5382 Mon Sep 17 00:00:00 2001 From: dswbx Date: Sat, 7 Jun 2025 08:48:28 +0200 Subject: [PATCH] fix logout by setting the api route as logout target --- app/src/auth/authenticate/Authenticator.ts | 1 + app/src/modules/server/AdminController.tsx | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/auth/authenticate/Authenticator.ts b/app/src/auth/authenticate/Authenticator.ts index 894f09a..4357da0 100644 --- a/app/src/auth/authenticate/Authenticator.ts +++ b/app/src/auth/authenticate/Authenticator.ts @@ -347,6 +347,7 @@ export class Authenticator = Record< } async logout(c: Context) { + $console.info("Logging out"); c.set("auth", undefined); const cookie = await this.getAuthCookie(c); diff --git a/app/src/modules/server/AdminController.tsx b/app/src/modules/server/AdminController.tsx index c42e828..a39826b 100644 --- a/app/src/modules/server/AdminController.tsx +++ b/app/src/modules/server/AdminController.tsx @@ -50,11 +50,11 @@ export class AdminController extends Controller { } get basepath() { - return this.options.basepath ?? "/"; + return this.options.adminBasepath ?? "/"; } private withBasePath(route: string = "") { - return (this.basepath + route).replace(/(?