Build Redirect URI with Entity ID instead Plugin ID

Created on 16 January 2025, 4 days ago
Updated 18 January 2025, 3 days ago

Problem/Motivation

Our login broke with the latest version due to this commit:
https://git.drupalcode.org/project/keycloak/-/commit/fc240a19a3d85fdd4e4...

This code results in the behavior, that the openid_connect module always tries to load the client by an entity with the id "keycloak". If you added your Keycloak instance with any other name you will face a 404 Not Found after login and redirect from the identity provider.

If you look at the latest code from the openid_connect module, it doesn't seem to intended, that the client is loaded via plugin id:
https://git.drupalcode.org/project/openid_connect/-/blob/3.x/src/Control...
https://git.drupalcode.org/project/openid_connect/-/blob/3.x/openid_conn...
https://git.drupalcode.org/project/openid_connect/-/blob/3.x/src/Entity/...

Also this feature for multiple Keycloak instances won't work:
https://www.drupal.org/project/keycloak/issues/3390391 📌 Add keycloak support for multple instances from openid_connect 3.x Needs review

Steps to reproduce

- configure a OIDC Client of type "Keycloak" with the name "Foobar"
- perform a login you will be seeing a Not Found error
- delete the OIDC Client and create another one with the same settings but change the name to "Keycloak"
- perform a login and it works

Proposed resolution

Revert the commit that changed how the redirect uri is built.

🐛 Bug report
Status

Needs work

Version

2.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024