-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonzo.html
40 lines (30 loc) · 1.58 KB
/
monzo.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.js" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js" integrity="sha256-0YPKAwZP7Mp3ALMRVB2i8GXeEndvCq3eSl/WsAl1Ryk=" crossorigin="anonymous"></script>
</head>
<body>
<div>
<button id="authenticate">Authenticate me, pls</button>
</div>
</body>
<script>
function createRandomString( length ) {
var str = "";
for ( ; str.length < length; str += Math.random().toString( 36 ).substr( 2 ) );
return str.substr( 0, length );
}
var client_id = "oauthclient_000094PvINDGzT3k6tz8jp";
var authentication_code;
var redirect_uri = "https://eliijahh.github.io/monzo1.html/oauth2/callback?code=$authorization_code";
//var auth0_authorize = createRandomString(8);
//var encodedString = btoa(auth0_authorize);
$("#authenticate").on("click", function(){
document.location.href = "https://auth.monzo.com/?redirect_uri=" + redirect_uri + "&client_id=" + client_id + "&response_type=code";
});
</script>
</html>