Login redirect only on success and new auth success message
This commit is contained in:
@@ -127,7 +127,7 @@ def login():
|
||||
(uidquery, int(time.time()), timeout, "", session)
|
||||
)
|
||||
|
||||
response = redirect("/")
|
||||
response = make_response("<script>location.href = '/';</script>")
|
||||
response.set_cookie('session', value=session, expires=timeout)
|
||||
return response
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<h2>Einloggen</h2>
|
||||
<form action="/auth/login" method="post" >
|
||||
<form hx-post="/auth/login" hx-target="#main-frame" >
|
||||
<input type="text" name="user" placeholder="Nutzername" value="{{ username }}"><br>
|
||||
<input type="password" name="pass" placeholder="Passphrase"><br>
|
||||
<label>Automatisch abmelden in:</label>
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
<h2>Willkommen im Kontrollverlust!</h2>
|
||||
<p>Du kannst dich nun als {{username}} <button hx-get="/auth/login" hx-target="#main-frame">Anmelden</button>
|
||||
!</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user