From 610e83f3d6654d2fe95c20cf2280f7d894ac58f8 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 21 Mar 2016 12:39:30 -0700 Subject: Handle auth in authenticated state. This can happen if the user hits the back button and re-submits authentication. In that case it appears as if user name or password will work. Let's generate an error screen for that case to inform the user what is going on. --- main.txr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.txr b/main.txr index 35ec80f..cb58078 100755 --- a/main.txr +++ b/main.txr @@ -25,6 +25,9 @@ REMOTE_ADDR=@clientip @(if session-valid-p) @ (skip) @ (cases) +QUERY_STRING=auth +@ (error-form "Redundant Authentication" "You are already logged in") +@ (or) QUERY_STRING=logout @ (remove-session cookie-userid) @ (login-form "Logged out; you may log in again.") -- cgit v1.2.3