1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Minor tweaks in OAuth README

This commit is contained in:
Carlos Antonio da Silva 2010-07-15 14:47:56 -03:00 committed by José Valim
parent bd8d11e291
commit d0d88cf259
2 changed files with 5 additions and 5 deletions

View file

@ -257,7 +257,7 @@ Do not use such helpers for integration tests such as Cucumber or Webrat. Instea
== OAuth2
Since version 1.2, Devise comes with OAuth support out of the box. To create OAuth support from Github for example, first you need to register your in Github and add it as provider in your devise initializer:
Since version 1.2, Devise comes with OAuth support out of the box. To create OAuth support from Github for example, first you need to register your app in Github and add it as provider in your devise initializer:
config.oauth :github, 'APP_ID', 'APP_SECRET',
:site => 'https://github.com/',
@ -275,7 +275,7 @@ And add a link to your views/sign up form:
<%= link_to "Sign in as User with Github", user_oauth_authorize_url(:github) %>
This link will send the user straight to Github. After the user authorizes your applications, Github will redirect the user back to your application at "/users/oauth/github/callback". This URL will be handled *internally* and *automatically* by +Devise::OauthCallbacksController#github+ action, which looks like this:
This link will send the user straight to Github. After the user authorizes your application, Github will redirect the user back to your application at "/users/oauth/github/callback". This URL will be handled *internally* and *automatically* by +Devise::OauthCallbacksController#github+ action, which looks like this:
def github
access_token = github_config.access_token_by_code(params[:code])

View file

@ -31,7 +31,7 @@ module Devise
# This method checks three things:
#
# * If the URL being access is a valid provider for the given scope;
# * If the URL being accessed is a valid provider for the given scope;
# * If code or error was streamed back from the server;
# * If the resource class implements the required hook;
#