OpenIDConnect auth fails - "Undefined method `with indifferent access' for "<user data>" :string res.body.with indifferent access ^^^^^^^^".

Summary

After upgrading gitlab instance from v17.2.4 to v17.3.1/v17.3.0 we faced issue to login it shows below error:

Could not authenticate you from OpenIDConnect because "Undefined method with indifferent access' for "{\"email\":\"abcxyz@example.com\",\"given name\":\"abc\",\"family name\":\"xyz\",\"name\":\"abc xyz\",\"preferred username\":\"abcxyz@example.com\",\"profile\":\"https:\\/\\/accounts.example.com\\/account\\/17086\",\"picture\":\"https:\\/\\/accounts.example.com\\/sites\\/default\\/files\\/network\\/style\\/avatar\\/mail\\/753d7889bfbfe4051?mail=abcxyz%40example.com\",\"zoneinfo\":\"india\\/mumbai\",\"locale\":\"en\",\"email verified\":false,\"sub\":\"f5b1f34a1f79\"}":string res.body.with indifferent access ^^^^^^^^^^^^^^^^^^^^^^^^".

Steps to reproduce

Pre-requisite: OpenID connect should be configured to auth login.

Login works with gitlab version v17.2.x.

But after upgrading instance from v17.2.x to v17.3.x Failure can be observed.

Example Project

Not specific to project

What is the current bug behavior?

Login fails with above mentioned error.

What is the expected correct behavior?

Login should not fail and allow user to access instance.

Relevant logs and/or screenshots

image

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Edited by Akash Karangale