Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #7191

Closed
Open
Created Jun 24, 2014 by Administrator@rootOwner

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

Assignee
Assign to
Time tracking