Commit 63daa4a897dafb99a7f7eab35fde3db23233b4da
Committed by
Diego Camarinha
1 parent
5297ed45
[Colab] Removes debug print from RemoteUser sign in
Showing
1 changed file
with
2 additions
and
5 deletions
Show diff stats
app/controllers/users/omniauth_callbacks_controller.rb
| @@ -4,11 +4,8 @@ module Users | @@ -4,11 +4,8 @@ module Users | ||
| 4 | auth = request.env["omniauth.auth"] | 4 | auth = request.env["omniauth.auth"] |
| 5 | user = User.find_or_create_by(email: auth.info.email, name: auth.info.name, provider: auth.provider, uid: auth.uid) | 5 | user = User.find_or_create_by(email: auth.info.email, name: auth.info.name, provider: auth.provider, uid: auth.uid) |
| 6 | 6 | ||
| 7 | - if user.valid? | ||
| 8 | - sign_in_and_redirect user | ||
| 9 | - else | ||
| 10 | - raise "Fuck you: #{user.errors.full_messages}" | ||
| 11 | - end | 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 | ||
| 12 | end | 9 | end |
| 13 | 10 | ||
| 14 | alias_method :RemoteUser, :all | 11 | alias_method :RemoteUser, :all |