From 05766a5be2dab16a8b7b9ba04b394cb67db08ac1 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Wed, 1 Jul 2015 14:58:44 +0300 Subject: [PATCH] New Way to login (For Debugging) - this way production will work as it should! --- SE_API/API.py | 4 +++ templates/DEBUG_Views/set_cookie.html | 37 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 templates/DEBUG_Views/set_cookie.html diff --git a/SE_API/API.py b/SE_API/API.py index 4918e46..faac0a0 100644 --- a/SE_API/API.py +++ b/SE_API/API.py @@ -206,6 +206,10 @@ def login(): return github.authorize() +@app.route('/debug/login') +def set_local_token_view(): + return app.send_static_file('DEBUG_Views/set_cookie.html') + @app.route('/api/qa/init') def init_QA(): diff --git a/templates/DEBUG_Views/set_cookie.html b/templates/DEBUG_Views/set_cookie.html new file mode 100644 index 0000000..e1bd973 --- /dev/null +++ b/templates/DEBUG_Views/set_cookie.html @@ -0,0 +1,37 @@ + + + + + + + + + +
+ +Enter The User Token: + + +
+ + \ No newline at end of file