Skip to content

Instantly share code, notes, and snippets.

@gideondsouza
Last active December 10, 2015 08:28
Show Gist options
  • Save gideondsouza/4407530 to your computer and use it in GitHub Desktop.
Save gideondsouza/4407530 to your computer and use it in GitHub Desktop.
#on the top
my $client_id = "YOUR CLIENT ID HERE";
my $client_secret = "YOUR SECRET ID HERE";
#route to login
get '/login' => sub {
#redirect the user to githubs login/authorize page
#we pass in a silly state (x12) ideally this should be generated
redirect "https://github.com/login/oauth/authorize?&client_id=$client_id&state=x12";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment