From 2c802b9e12d6c4bc663f98eac516e3b6a8701559 Mon Sep 17 00:00:00 2001 From: maphew Date: Sat, 23 Nov 2024 12:47:34 -0700 Subject: [PATCH] WIP: redirect anonymous bare root url to /share #658 Redirect works. Must share at least one note and make it `#shareRoot` Todo: - explore making this an optional setting in UI - make the share and login urls customizable - think about if/where/how to put login link in default share theme --- src/services/auth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/auth.ts b/src/services/auth.ts index f19976616..83fd2f3f4 100644 --- a/src/services/auth.ts +++ b/src/services/auth.ts @@ -17,7 +17,8 @@ function checkAuth(req: AppRequest, res: Response, next: NextFunction) { res.redirect("setup"); } else if (!req.session.loggedIn && !utils.isElectron() && !noAuthentication) { - res.redirect("login"); + // res.redirect("login"); + res.redirect("share"); } else { next();