diff --git a/content/guides/basics-of-authentication.md b/content/guides/basics-of-authentication.md index a3160596ba..d8f6f5d2ac 100644 --- a/content/guides/basics-of-authentication.md +++ b/content/guides/basics-of-authentication.md @@ -11,12 +11,12 @@ In this section, we're going to focus on the basics of authentication. Specifica we're going to create a Ruby server (using [Sinatra][Sinatra]) that implements the [web flow][webflow] of an application in several different ways. -Note: you can download the complete source code for this project [from the platform-samples repo](https://github.com/github/platform-samples/tree/master/api/ruby/basics-of-authentication). +Note: you can download the complete source code for this project +[from the platform-samples repo][platform samples]. ## Registering your app -First, you'll need to [register your -application](https://github.com/settings/applications/new). Every +First, you'll need to [register your application][new oauth app]. Every registered OAuth application is assigned a unique Client ID and Client Secret. The Client Secret should not be shared! That includes checking the string into your repository. @@ -36,6 +36,7 @@ Now, let's start filling out our simple server. Create a file called _server.rb_ #!ruby require 'sinatra' require 'rest-client' + require 'json' CLIENT_ID = ENV['GH_BASIC_CLIENT_ID'] CLIENT_SECRET = ENV['GH_BASIC_SECRET_ID'] @@ -44,7 +45,8 @@ Now, let's start filling out our simple server. Create a file called _server.rb_ erb :index, :locals => {:client_id => CLIENT_ID} end -Your client ID and client secret keys come from [your application's configuration page](https://github.com/settings/applications). You should **never, _ever_** store these values in +Your client ID and client secret keys come from [your application's configuration +page][app settings]. You should **never, _ever_** store these values in GitHub--or any other public place, for that matter. We recommend storing them as [environment variables][about env vars]--which is exactly what we've done here. @@ -55,18 +57,27 @@ Next, in _views/index.erb_, paste this content:
-Well, hello there!
-We're going to now talk to the GitHub API. Ready? Click here to begin!
-If that link doesn't work, remember to provide your own Client ID!
++ Well, hello there! +
++ We're going to now talk to the GitHub API. Ready? + Click here to begin! +
++ If that link doesn't work, remember to provide your own Client ID! +