Commit dafef50322e63942f2650d15992b182d18d7d717
1 parent
2ce0de6b
Redirect to relative path after omniauth signin
Redirecting with a URL lead to errors when behind Colab as the domains may differ. Signed off by: Diego Araújo <diegoamc90@gmail.com>
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
app/controllers/users/omniauth_callbacks_controller.rb
| ... | ... | @@ -5,7 +5,8 @@ module Users |
| 5 | 5 | user = User.find_or_create_by(email: auth.info.email, name: auth.info.name, provider: auth.provider, uid: auth.uid) |
| 6 | 6 | |
| 7 | 7 | # Given colab works properly, since the user is always found or redirected, there is no chanche of an invalid user |
| 8 | - sign_in_and_redirect user | |
| 8 | + sign_in(:user, user) | |
| 9 | + redirect_to root_path | |
| 9 | 10 | end |
| 10 | 11 | |
| 11 | 12 | alias_method :RemoteUser, :all | ... | ... |