New Way to login (For Debugging) - this way production will work as it should!
This commit is contained in:
parent
99f7f32075
commit
05766a5be2
2 changed files with 41 additions and 0 deletions
|
@ -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():
|
||||
|
|
37
templates/DEBUG_Views/set_cookie.html
Normal file
37
templates/DEBUG_Views/set_cookie.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
cookie_name = "com.sehub.www";
|
||||
var YouEntered;
|
||||
|
||||
function putCookie() {
|
||||
|
||||
if(document.cookie != document.cookie)
|
||||
{index = document.cookie.indexOf(cookie_name);}
|
||||
else
|
||||
{ index = -1;}
|
||||
|
||||
if (index == -1)
|
||||
{
|
||||
YouEntered=document.cf.cfd.value;
|
||||
document.cookie=""+cookie_name+"="+YouEntered+"; path=/";
|
||||
window.location.assign("/");
|
||||
}
|
||||
|
||||
}
|
||||
</SCRIPT>
|
||||
|
||||
<FORM NAME="cf">
|
||||
|
||||
Enter The User Token: <INPUT TYPE="text" NAME="cfd" size="20">
|
||||
<INPUT TYPE="button" Value="Set to Cookie"
|
||||
onClick="putCookie()">
|
||||
|
||||
</FORM>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue