README.md in omniauth-google-oauth2-1.1.2 vs README.md in omniauth-google-oauth2-1.1.3
- old
+ new
@@ -38,11 +38,11 @@
You can now access the OmniAuth Google OAuth2 URL: `/auth/google_oauth2`
For more examples please check out `examples/omni_auth.rb`
-[Using Devise? Skip the above and jump down to the Devise section!](#devise) After setting up the provider via Devise, you can reference the confdiurations below.
+[Using Devise? Skip the above and jump down to the Devise section!](#devise) After setting up the provider via Devise, you can reference the configurations below.
NOTE: While developing your application, if you change the scope in the initializer you will need to restart your app server. Remember that either the 'email' or 'profile' scope is required!
## Configuration
@@ -203,10 +203,12 @@
```
and bind to or create the user
```ruby
+# app/models/user.rb
+
def self.from_omniauth(access_token)
data = access_token.info
user = User.where(email: data['email']).first
# Uncomment the section below if you want users to be created if they don't exist
@@ -231,10 +233,10 @@
<%# Devise prior 4.1.0: %>
<%= link_to "Sign in with Google", user_omniauth_authorize_path(:google_oauth2) %>
```
-An overview is available at https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
+An overview is available at https://github.com/heartcombo/devise/wiki/OmniAuth:-Overview
### One-time Code Flow (Hybrid Authentication)
Google describes the One-time Code Flow [here](https://developers.google.com/identity/sign-in/web/server-side-flow). This hybrid authentication flow has significant functional and security advantages over a pure server-side or pure client-side flow. The following steps occur in this flow: