Skip to content

Instantly share code, notes, and snippets.

@jackrobertscott
Last active December 10, 2019 13:08
Show Gist options
  • Save jackrobertscott/80e51c54a084e3c86d16bc9ee33bac5f to your computer and use it in GitHub Desktop.
Save jackrobertscott/80e51c54a084e3c86d16bc9ee33bac5f to your computer and use it in GitHub Desktop.
import * as queryString from 'query-string';
const params = queryString.stringify({
client_id: process.env.APP_ID_GOES_HERE,
redirect_uri: 'https://www.example.com/authenticate/github',
scope: ['read:user', 'user:email'].join(' '), // space seperated string
allow_signup: true,
});
const githubLoginUrl = `https://github.com/login/oauth/authorize?${params}`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment