Playing with OmniAuth

However OmniAuth is mainly used for authorization. So let's try a more
lightweight approach with just OpenID.
This commit is contained in:
Christoph Haas 2017-04-15 23:08:25 +02:00
parent 8d15711c0f
commit 898dd81c6b
15 changed files with 219 additions and 21 deletions

View file

@ -16,7 +16,6 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
# session["devise.google_data"] = request.env["omniauth.auth"].except(:extra) #Removing extra as it can overflow some session stores
redirect_to new_user_session_url, alert: @user.errors.full_messages.join("\n")
end
end
def google_oauth2
@ -45,12 +44,12 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
end
end
# def failure
# redirect_to root_path
# end
def failure
redirect_to root_path
end
private
# private
#
# def providers
# ["twitter", "google_oauth2", "launchpad", "amazon"]
# end