OAuth login generated a 422 error during login
Created by: timball
have gitlab version 6.8.1 installed . We have logins done via GOOG OAuth2 . when one user who already had a user account tried to login she got a 422 error . the "fix" was to delete her user and have her login again . i believe this is a bug because it tried to create a new user rather than use the old one . feels out-by-one-ish or some goof w/ whatever new OAuth2 stuff the GOOG is pulling . this is what was in the production log :
Processing by OmniauthCallbacksController#google_oauth2 as HTML
Parameters: {"state"=>"335f74aadcab5d594739b474bc0126d5492116307458df41", "code"=>"4/FdbvVbYCJ1w4DBzk8y4vBhRhgS84.sp9MvLR5hQMcaDn_6y0ZQNiyrRCejQI"}
Completed 422 Unprocessable Entity in 91ms
ActiveRecord::RecordInvalid (Validation failed: Email has already been taken, Email has already been taken):
lib/gitlab/oauth/user.rb:43:in `create'
app/controllers/omniauth_callbacks_controller.rb:41:in `handle_omniauth'
app/controllers/omniauth_callbacks_controller.rb:4:in `block (2 levels) in <class:OmniauthCallbacksController>'
app/controllers/application_controller.rb:59:in `set_current_user_for_thread'
--timball