Class: Users::OmniauthCallbacksController
- Inherits:
-
Devise::OmniauthCallbacksController
- Object
- Devise::OmniauthCallbacksController
- Users::OmniauthCallbacksController
- Defined in:
- app/controllers/users/omniauth_callbacks_controller.rb
Instance Method Summary collapse
Instance Method Details
#failure ⇒ Object
17 18 19 |
# File 'app/controllers/users/omniauth_callbacks_controller.rb', line 17 def failure redirect_to root_path end |
#openid_connect ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/users/omniauth_callbacks_controller.rb', line 5 def openid_connect @user = Custom::OidcUser.from_omniauth(request.env["omniauth.auth"]) if @user.persisted? && @user.errors.empty? sign_in_and_redirect @user, event: :authentication # this will throw if @user is not activated (:notice, :success, kind: "OpenIDConnect") if else # session["devise.facebook_data"] = request.env["omniauth.auth"].except(:extra) # Removing extra as it can overflow some session stores redirect_to new_user_registration_url end end |