Skip to content

Commit f92cfd6

Browse files
Added demo links
1 parent 9bf73e2 commit f92cfd6

File tree

3 files changed

+42
-31
lines changed

3 files changed

+42
-31
lines changed

index.html

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
<div id="heading">
3232
<div id="logo">oauth-ng</div>
3333
<div id="tagline">AngularJS directive for OAuth 2.0</a></div>
34+
<p class="btn-group">
35+
<a href="https://github.com/andreareginato/oauth-ng" class="btn" target="_blank">See on Github</a>
36+
</p>
3437
</div>
3538
</section>
3639

@@ -72,7 +75,7 @@ <h2>Basic Example</h2>
7275
scope="<scope>">
7376
</oauth>
7477

75-
<script>angular.module('app', ['ng-oauth']);</script>
78+
<script>angular.module('app', ['oauth-ng']);</script>
7679
</body></xmp></code></pre>
7780

7881
<p>
@@ -90,7 +93,12 @@ <h2>Basic Example</h2>
9093
<h1 id="howto">Create your first app with oauth-ng</h1>
9194
<p>
9295
In this section you will learn how to use the directive to authorize an OAuth 2.0 server
93-
through the creation of a real project. It will take less than 15 minutues.
96+
through the creation of a real project. It will take less than 10 minutues.
97+
</p>
98+
99+
<p class="btn-group">
100+
<a href="https://oauth-ng-demo.herokuapp.com/" class="btn" target="_blank">View Demo</a>
101+
<a href="https://github.com/andreareginato/oauth-ng-demo" class="btn" target="_blank">Demo Github Repository</a>
94102
</p>
95103

96104

@@ -172,7 +180,7 @@ <h2>Install oauth-ng</h2>
172180

173181
<p>
174182
Now you have <code>oauth-ng</code> and all its dependencies ready to be used.
175-
To automatically add them to your index page, stop and restart the server.
183+
Restart the server to automatically add them to your index page.
176184
</p>
177185

178186
<pre><code>$ grunt serve</code></pre>
@@ -194,35 +202,24 @@ <h2>AngularJS app definition</h2>
194202
<h2 id="server">OAuth 2.0 Server</h2>
195203

196204
<p>
197-
To test the directive we created a basic OAuth 2.0 authorization server.
198-
199-
<ul>
200-
<li>http://oauth-ng-server.herokuapp.com</li>
201-
</ul>
202-
</p>
203-
204-
<p>
205-
The source code is available on <a href="#" target="blank">Github</a>.
205+
To test the directive we created a basic OAuth 2.0 authorization server at the address
206+
<code>http://oauth-ng-server.herokuapp.com</code>.
206207
</p>
207208

208209

209210
<h2>Identify your application</h2>
210211

211212
<p>
212213
To make the directive work you need a registered application to get its
213-
<code>client-id</code> and <code>redirect-uri</code>.
214+
<code>client-id</code> and <code>redirect-uri</code>. For this example we
215+
created a demo app with the following credentials.
214216
</p>
215217

216218
<ul>
217219
<li><strong>client-id</strong> - 017b9f702a904869a6e52bd39b147bb912</li>
218220
<li><strong>redirect-uri</strong> - http://localhost:9000</li>
219221
</ul>
220222

221-
<p>
222-
Use the credentials above or <a href="" target="blank">register</a>
223-
a new application.
224-
</p>
225-
226223

227224
<h2>Add the oauth-ng directive</h2>
228225

@@ -232,14 +229,14 @@ <h2>Add the oauth-ng directive</h2>
232229

233230
<pre><code><xmp><oauth
234231
site="http://oauth-ng-server.herokuapp.com"
235-
client-id="017b9f702a904869a6e52bd39b147bb912"
232+
client-id="d6d2b510d18471d2e22aa202216e86c42beac80f9a6ac2da505dcb79c7b2fd99"
236233
redirect-uri="http://localhost:9000"
237-
profile-uri="http://oauth-ng-server.herokuapp.com/profile"
238-
scope="profile">
234+
profile-uri="http://oauth-ng-server.herokuapp.com/api/v1/me"
235+
scope="public">
239236
</oauth></xmp></code></pre>
240237

241238
<p>
242-
Here a description for the used attributes.
239+
Here a description for what these settings are about.
243240
</p>
244241

245242
<table class="table table-labeled">
@@ -288,22 +285,24 @@ <h2>Add the oauth-ng directive</h2>
288285
</table>
289286

290287

291-
292288
<h2>You're done!</h2>
293289

294290
<p>
295-
Nothing else to do. Open your index page, click the <code>Login</code> link,
296-
authorize your app and get the authenticated user info. You are now ready to
297-
access to your API using OAuth 2.0 and AngularJS.
291+
Open your index page, click to the Login link and authorize your application
292+
to get a new access token. You are now ready to access your API using OAuth
293+
2.0 and AngularJS.
298294
</p>
299295

300-
<p>
301-
#TODO See Demo.
296+
<p class="btn-group">
297+
<a href="https://oauth-ng-demo.herokuapp.com/" class="btn" target="_blank">View Demo</a>
298+
<a href="https://github.com/andreareginato/oauth-ng-demo" class="btn" target="_blank">Demo Github Repository</a>
302299
</p>
303300

304-
<p>
305-
#TODO See Github Repository.
306-
</p>
301+
302+
<a href="https://oauth-ng-demo.herokuapp.com/"target="_blank">
303+
<img src="public/images/demo.png"></img>
304+
</a>
305+
307306
</div>
308307
</section>
309308

public/images/demo.png

56.1 KB
Loading

public/style.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,15 @@ table.button .parameter {
288288
padding: 1em;
289289
border: 1px solid #e4e4e4;
290290
}
291+
292+
.btn {
293+
display: inline-block;
294+
text-decoration: none;
295+
border: 1px solid #000;
296+
padding: 0.5em 1em;
297+
margin-right: 0.5em;
298+
}
299+
300+
.btn-group {
301+
margin-top: 2em;
302+
}

0 commit comments

Comments
 (0)