Commit 86ebd8b9345b23cc6b14c680ec392ffb2d61ae63
Committed by
Rafael Reggiani Manzo
1 parent
f0dca725
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 | ... | ... |