-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathauth.html
More file actions
49 lines (39 loc) · 1.41 KB
/
auth.html
File metadata and controls
49 lines (39 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!doctype html>
<html>
<head>
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta name="mobile-web-app-capable" content="yes">
<meta name="robots" content="noindex">
<!-- helps makes site responsive on phones/tablets. -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.6/paper/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="panel panel-default">
<div class="panel-body">
<h1>Authorizing...</h1>
</div>
</div>
</div>
<script>
var parseQuery = function() {
var q = window.location.search,
_obj = {},
arr = q ? window.location.search.split('?')[1].split('&') : [];
for (var i = 0; i < arr.length; i++) { _obj[arr[i].split('=')[0]] = arr[i].split('=')[1]; }
return _obj;
}
var parsedQuery = parseQuery();
localStorage.setItem('oauth_auth_id', parsedQuery['auth_id']);
localStorage.setItem('oauth_code', parsedQuery['code']);
localStorage.setItem('oauth_client_id', parsedQuery['client_id']);
localStorage.setItem('oauth_secret', parsedQuery['secret']);
console.log(parsedQuery);
setTimeout(function() {
//asdfasdfas
window.location.href = '/';
}, 5);
</script>
</body>
</html>