Class: Devise::Auth0CallbacksController
- Inherits:
-
OmniauthCallbacksController
- Object
- OmniauthCallbacksController
- Devise::Auth0CallbacksController
- Defined in:
- app/controllers/devise/auth0_callbacks_controller.rb
Instance Method Summary collapse
Instance Method Details
#callback ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/devise/auth0_callbacks_controller.rb', line 5 def callback user = resource_class.from_auth0_omniauth(request.env["omniauth.auth"]) if user&.persisted? (:notice, :success, kind: "Auth0") if sign_in_and_redirect(user, event: :authentication) else session["devise.auth0_data"] = request.env["omniauth.auth"].except(:extra) redirect_to(after_omniauth_callback_path_for(resource_name)) end end |