Google authentication added

This commit is contained in:
Christoph Haas 2017-04-17 00:42:03 +02:00
parent f7258370a0
commit 2a7491edcd
7 changed files with 37 additions and 28 deletions

View file

@ -11,6 +11,10 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
login_via 'StackExchange'
end
def google_oauth2
login_via 'Google'
end
def login_via(provider_name)
# You need to implement the method below in your model (e.g. app/models/user.rb)
@user = User.from_omniauth(request.env["omniauth.auth"])