From 0af26d4bbe495e453d046370aa1606da22134537 Mon Sep 17 00:00:00 2001 From: Felix Wolfsteller Date: Mon, 29 Jul 2024 03:39:34 +0200 Subject: [PATCH] improve README (#459) * fix typo * mention example file path * update link --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b86b49..a9f90e0 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ 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! @@ -205,6 +205,8 @@ end and bind to or create the user ```ruby +# app/mocdels/user.rb + def self.from_omniauth(access_token) data = access_token.info user = User.where(email: data['email']).first @@ -233,7 +235,7 @@ For your views you can login using: <%= 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)