Skip to content

wonderbeyond/ezgist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

ezgist

Github API OAuth flow(Temp note):

2. GitHub redirects back to: https://wonderbeyond.github.io/ezgist/?code=#/oauth-callback

3. Exchange code for an access token(via XMLHttpRequest):

Take jQuery.ajax for example:

$.ajax({
    url: 'https://github.com/login/oauth/access_token?client_id=18a799f4b218bafe39de&client_secret=7d6a559a42641169b81f9fd3221710e3db312802&code=d724fc5fccff76cb1032',
    type: 'POST',
    dataType: 'json',
})
.done(function() {
    console.log("success");
})
.fail(function() {
    console.log("error");
})
.always(function() {
    console.log("complete");
});

Got: cc423681a042ca502fde37da44f49835b20c6543

4. get resource

http get 'https://api.github.com/gists/starred' 'Authorization:token cc423681a042ca502fde37da44f49835b20c6543'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published