about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/oauth2/routes.py4
-rw-r--r--wqflask/wqflask/templates/oauth2/login.html1
2 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/wqflask/oauth2/routes.py b/wqflask/wqflask/oauth2/routes.py
index 5411c3c6..2f4d4492 100644
--- a/wqflask/wqflask/oauth2/routes.py
+++ b/wqflask/wqflask/oauth2/routes.py
@@ -69,7 +69,9 @@ def login():
             session["oauth2_token"] = token
         except OAuthError as _oaerr:
             flash(_oaerr.args[0], "alert-danger")
-            return render_template("oauth2/login.html")
+            return render_template(
+                "oauth2/login.html", next_endpoint=next_endpoint,
+                email=form.get("email_address"))
 
     if user_logged_in():
         if next_endpoint:
diff --git a/wqflask/wqflask/templates/oauth2/login.html b/wqflask/wqflask/templates/oauth2/login.html
index 6288b630..3de15812 100644
--- a/wqflask/wqflask/templates/oauth2/login.html
+++ b/wqflask/wqflask/templates/oauth2/login.html
@@ -19,6 +19,7 @@
 	       style="text-align:left;">Email</label>
 	<div style="margin-left:20px;" class="col-xs-4">
 	  <input id="email_address" name="email_address" type="email"
+		 {%if email%}value="{{email}}"{%endif%}
 		 placeholder="your@email.address" size="50"
 		 class="form-control" />
 	</div>