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 <mail@tazj.in>
This commit is contained in:
parent
f46aa2a20c
commit
14a8142f76
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue