Google authentication added
This commit is contained in:
parent
f7258370a0
commit
2a7491edcd
7 changed files with 37 additions and 28 deletions
|
|
@ -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"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue