Skip to content

day 30: missing client_id field in /github/auth #5

Description

@ifwatts

Code below needs to also pass in config.client_id as it is mandatory

app.get('/github/auth', function(req,res){
   // redirect the user to github authorization url
   return res.redirect(config.authorize_url);
});

I have changed my sample to be like..

app.get('/github/auth', function(req,res){
  // redirect the user to github authorization url
  console.log("In github/auth , redirecting to " + client.redirect_url );
  return res.redirect(`${config.authorize_url}?client_id=${config.client_id}?redirect_url=${client.redirect_url}`);
});

This is based on the github documentation here
https://developer.github.com/enterprise/2.19/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow
which calls out that client_id is mandatory

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions