Skip to content

Commit

Permalink
weird
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Apr 1, 2011
1 parent 05ed1c5 commit 121790b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions _posts/2010-04-23-oauth.markdown
Expand Up @@ -13,25 +13,25 @@ This is a description of the OAuth flow from 3rd party web sites.

1. Redirect users to a this link to request GitHub access.

GET https://github.com/login/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/oauth_redirect
GET https://github.com/login/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/oauth_redirect

2. If the user accepts your request, GitHub redirects back to your site with a temporary code in a code parameter. Exchange this for an access token:

POST https://github.com/login/oauth/access_token?
client_id=...&
redirect_uri=http://www.example.com/oauth_redirect&
client_secret=...&
code=...
POST https://github.com/login/oauth/access_token?
client_id=...&
redirect_uri=http://www.example.com/oauth_redirect&
client_secret=...&
code=...

RESPONSE:
access_token=...
RESPONSE:
access_token=...

3. You have the access token, so now you can make requests on the user's behalf:

GET https://github.com/api/v2/json/user/show?
access_token=...
GET https://github.com/api/v2/json/user/show?
access_token=...

## Javascript/Desktop Flow

Expand Down

0 comments on commit 121790b

Please sign in to comment.