Skip to content

Commit df3b918

Browse files
committed
routes/github-authorize: Add documentation
1 parent eddf4bd commit df3b918

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/routes/github-authorize.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
import Ember from 'ember';
22
import ajax from 'ic-ajax';
33

4+
/**
5+
* This route will be called from the GitHub OAuth flow once the user has
6+
* accepted or rejected the data access permissions. It will forward the
7+
* temporary `code` received from the GitHub API to our own API server which
8+
* will exchange it for an access token.
9+
*
10+
* After the exchange the API will return an API token and the user information.
11+
* The result will be stored and the popup window closed. The `/login` route
12+
* will then continue to evaluate the response.
13+
*
14+
* @see https://developer.github.com/v3/oauth/#github-redirects-back-to-your-site
15+
* @see `/login` route
16+
*/
417
export default Ember.Route.extend({
518
beforeModel: function(transition) {
619
return ajax('/authorize', {data: transition.queryParams}).then(function(d) {

0 commit comments

Comments
 (0)