From 4755288fedd93a12825d5c9bf0157014a4784177 Mon Sep 17 00:00:00 2001 From: dswbx Date: Wed, 29 Jan 2025 20:30:27 +0100 Subject: [PATCH] improve fallbacks for redirection --- app/src/auth/authenticate/Authenticator.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/auth/authenticate/Authenticator.ts b/app/src/auth/authenticate/Authenticator.ts index 63f4f22..13fa6bc 100644 --- a/app/src/auth/authenticate/Authenticator.ts +++ b/app/src/auth/authenticate/Authenticator.ts @@ -316,10 +316,7 @@ export class Authenticator = Record< return c.json(data); } - const successUrl = this.getSafeUrl( - c, - redirect ? redirect : (this.config.cookie.pathSuccess ?? "/") - ); + const successUrl = this.getSafeUrl(c, redirect ?? this.config.cookie.pathSuccess ?? "/"); const referer = redirect ?? c.req.header("Referer") ?? successUrl; //console.log("auth respond", { redirect, successUrl, successPath });