Search code examples
oauthprose

How to Register a new OAuth applicationin github


I am trying to make a site from code https://github.com/prose/prose site link is http://editor.jus.in what should be my Homepage URL and Authorization callback URL for this application on https://github.com/settings/applications/new ?

In apps documentation it says

1.Redirect users to request GitHub access.

GET https://github.com/login/oauth/authorize

2.GitHub redirects back to your site including a temporary code you need for the next step.

You can grab it like so:

var code = window.location.href.match(/\?code=(.*)/)[1];

3.Request the actual token using your instance of Gatekeeper, which knows your client_secret.

$.getJSON('http://localhost:9999/authenticate/'+code, function(data) {
  console.log(data.token);
});

Where should I do these changes? Thanks.


Solution

  • I need to build master branch locally