After deleting a client (I called it "cheryltest_oidc_client"), and adding a new client (called "okta"), I get the following notice and error any time I try to use the logout link on the site:

Notice: Undefined index: cheryltest_oidc_client in Drupal\openid_connect\Controller\OpenIDConnectRedirectController->redirectLogout() (line 299 of /code/web/modules/contrib/openid_connect/src/Controller/OpenIDConnectRedirectController.php)

Error: Call to a member function getPlugin() on null in Drupal\openid_connect\Controller\OpenIDConnectRedirectController->redirectLogout() (line 300 of /code/web/modules/contrib/openid_connect/src/Controller/OpenIDConnectRedirectController.php)

The notice and error persists even after disabling and uninstalling openid_connect, and reinstalling it.

The notice and error also persist after I've tried installing the latest dev version of openid_connect module.

I marked this issue critical because this renders the logout process completely useless.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cmcnamee created an issue. See original summary.

cmcnamee’s picture

I've checked the database, and the only config entry I see in there is for the "okta" one, not the "cheryltest_oidc_client" one that I had previously deleted. I've flushed caches many times and have also tried running this locally so as to rule out any caching on pantheon. I'm confused about how OpenIDConnectRedirectController->redirectLogout() is still looking for "cheryltest_oidc_client". I unfortunately don't have the ability to do any breakpoint type debugging right now. I will keep digging, though.

If anyone else knows why this is happening, I'm all ears. My project is supposed to hard-launch this week.

jcnventura’s picture

Hi @cmcnamee. Can you check what entries are still in the authmap table? There should be an entry from openid_connect.cheryltest_oidc_client.

  • jcnventura committed a4adbff on 2.x
    Issue #3218775 by jcnventura: Deleting a previously used client causes...
jcnventura’s picture

Status: Active » Fixed

I've added a check to prevent the fatal error, and also deleted all entries in the authmap for a given client when that client is deleted.

cmcnamee’s picture

I can confirm that the entry openid_connect.cheryltest_oidc_client was in fact an entry in the authmap table. Thanks for that catch!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.