-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.html
73 lines (66 loc) · 2.46 KB
/
index.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{% load static %}
<html>
<head>
<title>OAuth2 Sample App - Intuit</title>
<!-- <link rel="stylesheet" type="text/css" href="{% static "style.css" %}"> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
if (window.opener) {
window.opener.location.href = '/app/'
window.close()
}
function launchPopup(path) {
var win;
var checkConnect;
var parameters = "location=1,width=800,height=650";
parameters += ",left=" + (screen.width - 800) / 2 + ",top=" + (screen.height - 650) / 2;
// Launch Popup
win = window.open(path, 'connectPopup', parameters);
}
function migrateCall() {
$("#result").html('Loading...')
$.get("/app/migration", function (data) {
$("#result").html(JSON.stringify(data, null, 2))
})
}
</script>
</head>
<body>
<div id="loggedIn" />
<h3>Welcome to the Intuit OAuth2 Sample App!</h3>
Before using this app, please make sure you do the following:
<ul>
<li>
Update settings.py with your Client ID and Client Secret (found on
<a href="https://developer.intuit.com">developer.intuit.com</a>
)
</li>
<li>
In <a href="https://developer.intuit.com">developer.intuit.com</a>,
add an allowed Redirect URI to this sample app! (settings.py value: REDIRECT_URI)
</li>
</ul>
<br/><br/><br/>
<b>OpenID flow</b><br/>
<a class="imgLink" href="#" onclick="launchPopup('/app/openid/')">
<img
style="height: 40px"
src="{% static "IntuitSignIn-lg-white@2x.jpg" %}" alt="My image"
/>
</a>
<br/><br/><br/>
<b>OAuth2 flow</b><br/>
<a class="imgLink" href="#" onclick="launchPopup('/app/oauth/')">
<img
style="height: 40px"
src="{% static 'C2QB_white_btn_lg_default.png' %}"
/>
</a>
<br/><br/><br/>
<b>Migration API</b><br/>
<button onclick="migrateCall()">Migration API call</button>
<br />
<div><code id="result"></code></div>
<br/><br/><br/>
</body>
</html>