ShareCourse Outline

Build an App with React and Ampersand

3-1 Redirecting to GitHub for OAuth

next:Generating and validating state parameter
previous:Internal navigation


modules installed

We installed version 2.4.1 of qs you can grab this exact version by doing:

npm i --save qs@2.4.1


GitHub redirect url including client_id that will work as long as you're running on localhost:3000:

window.location = '' + qs.stringify({
  client_id: 'f8dd69187841cdd22a26',
  redirect_uri: window.location.origin + '/auth/callback',
  scope: 'user,repo'


Code Viewer