teamspaces / web

Web & API – Spaces is knowledge management for teams.
0 stars 0 forks source link

Fix redirect on omniauth-failures #269

Closed emmanuelmillionaer closed 7 years ago

emmanuelmillionaer commented 7 years ago

What

Fixes: https://sentry.io/spaces/web/issues/248694530/

Explanation

By default Devise would redirect_to new_user_session_path This route does not exist because, Devise-sessions are skipped:

 devise_for :users,
             skip: [:sessions],
             controllers: { omniauth_callbacks: "user/omniauth_callbacks",
                            passwords: "user/passwords" }

That's why here I overwrite new_session_path in the User::OmniauthCallbacksController

Related Links

Sentry: https://sentry.io/spaces/web/issues/248694530/

Screenshots

bildschirmfoto 2017-04-15 um 11 31 15