Update Redirect Uri

Created on 7 November 2017, over 6 years ago
Updated 7 December 2023, 7 months ago

When selecting clients in /admin/config/services/openid-connect, we can notice that Redirect URL is set to unsecured URL. Our site is configured and accessible with secured routes meaning all links starting with https will only work.

But say we select generic as client:

Redirect URL
http://sitename/openid-connect/generic

Client ID
testclient

Client secret
<clientsecret>

Authorization endpoint
https://sitename/auth/realms/master/protocol/openid-connect/auth

Token endpoint
https://sitename/auth/realms/master/protocol/openid-connect/token

UserInfo endpoint
https://sitename/auth/realms/master/protocol/openid-connect/userinfo

All other options can be modified except the Redirect URL that is set to a default value. How can I change that so I can use secured URL.

I found this portion of code from /src/Plugin/OpenIDConnectClientBase.php that might be displaying the Redirect URL value.

  public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $redirect_url = URL::fromRoute(
      'openid_connect.redirect_controller_redirect',
      [
        'client_name' => $this->pluginId,
      ],
      [
        'absolute' => TRUE,
      ]
    );
    $form['redirect_url'] = [
      '#title' => $this->t('Redirect URL'),
      '#type' => 'item',
      '#markup' => $redirect_url->toString(),
    ];
✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡΅πŸ‡­Philippines johnreytanquinco

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.69.0 2024