From 14a8142f7611378195234895aaa172983b6d5a10 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 28 Jul 2020 18:39:54 -0400 Subject: feat(web/panettone): persist original-uri through failed auth Even if the user fails to log in, maintain the original-uri param if present, so that if they eventually succeed at logging in they still get where they were originally trying to get. Change-Id: I2faa5eced002ab899c803cf19095cea76897d92d Reviewed-on: https://cl.tvl.fyi/c/depot/+/1499 Tested-by: BuildkiteCI Reviewed-by: tazjin --- web/panettone/src/panettone.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/panettone/src/panettone.lisp b/web/panettone/src/panettone.lisp index 3d1bf41b4a5c..15d3ba7577fc 100644 --- a/web/panettone/src/panettone.lisp +++ b/web/panettone/src/panettone.lisp @@ -365,7 +365,8 @@ successful, `nil' otherwise" (progn (setf (hunchentoot:session-value 'user) user) (hunchentoot:redirect (or original-uri "/"))) - (render/login :message "Invalid credentials"))) + (render/login :message "Invalid credentials" + :original-uri original-uri))) (defroute logout ("/logout" :method :post) () (hunchentoot:delete-session-value 'user) -- cgit 1.4.1