Last active
December 18, 2015 12:19
-
-
Save brianyang/5781606 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
example web app OAuth flow | |
1. Redirect users to request GitHub access (public key) | |
GET https://github.com/login/oauth/authorize | |
2. GitHub redirects back to your site | |
* Exchange this for an access token: (private key) | |
POST https://github.com/login/oauth/access_token | |
3. Use the access token to access the API | |
GET https://api.github.com/user?access_token=... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
req = $.ajax | |
url:'//site.com/api/v1/endpoint/' | |
type:'jsonp' | |
req.done (d) -> | |
console.log d | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment