# Cannot add additional parameters to authorize endpoint

**URL:** https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326
**Category:** SSO
**Tags:** openid-connect
**Created:** [April 19, 2023, 8:01pm UTC](https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326 "2023-04-19T20:01:49Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![nodomain](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nodomain/32/303402_2.png) [@nodomain](https://meta.discourse.org/u/nodomain)
#### Post date: [April 19, 2023, 8:01pm UTC](https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326/1 "2023-04-19T20:01:49Z")

</div>

I have a similar question as in [Format for 'openid connect authorize parameters' field](https://meta.discourse.org/t/format-for-openid-connect-authorize-parameters-field/234513).

Our Auth0 setup requires to add `connection=123` to the `authorize` endpoint. I tried several combinations of `openid connect authorize parameters` without success.

So either please give me a working example or fix the bug - I have the impression that the given parameters are not routed through to the authorize request at all.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 21, 2023, 5:01am UTC](https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326/2 "2023-04-21T05:01:49Z")

</div>

> [@nodomain](#):
>
> Our Auth0 setup requires to add `connection=123`

Looking at the code it looks like it needs to be in request params.

> <https://github.com/discourse/discourse-openid-connect/blob/a16d5edd386f4099064753a4eed72ecb9c1bb1a8/lib/omniauth_open_id_connect.rb#L88-L105>

Try using chrome dev tools, track all HTTP requests, are you certain this allow listed param is in the request params? This is just used to allow list stuff, not to hardcode a value.

If you need to hardcode a value a new feature would need to be built.

---

<div class="post-metadata">

### Author: ![nodomain](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nodomain/32/303402_2.png) [@nodomain](https://meta.discourse.org/u/nodomain)
#### Post date: [April 26, 2023, 3:48pm UTC](https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326/3 "2023-04-26T15:48:39Z")

</div>

I don’t get it. The parameters are not added at all…

---

<div class="post-metadata">

### Author: ![Alexander](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexander/32/497634_2.png) [@Alexander](https://meta.discourse.org/u/Alexander)
#### Post date: [April 26, 2023, 4:08pm UTC](https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326/4 "2023-04-26T16:08:23Z")

</div>

Happened to me on one occasion, adding the parameter directly in the authorize\_url seems to do the trick 🤔

---

<div class="post-metadata">

### Author: ![nodomain](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nodomain/32/303402_2.png) [@nodomain](https://meta.discourse.org/u/nodomain)
#### Post date: [April 27, 2023, 6:56am UTC](https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326/5 "2023-04-27T06:56:21Z")

</div>

And how are you supposed to do this? The plugin only takes the discovery document:

```yaml
plugins:
  openid_connect_enabled:
    default: false
  openid_connect_discovery_document:
    default: ""
  openid_connect_client_id:
    default: ""
  openid_connect_client_secret:
    default: ""
  openid_connect_rp_initiated_logout:
    default: false
  openid_connect_rp_initiated_logout_redirect:
    default: ""
  openid_connect_allow_association_change:
    default: false
  openid_connect_overrides_email:
    default: false
  openid_connect_authorize_scope:
    default: "openid"
  openid_connect_verbose_logging:
    default: false
  openid_connect_token_scope:
    default: ""
  openid_connect_error_redirects:
    default: ""
    type: list
    list_type: secret
  openid_connect_authorize_parameters:
    default: ""
    type: list
    list_type: compact
  openid_connect_claims:
    default: ""
    textarea: true
  openid_connect_match_by_email:
    default: true

```

---

<div class="post-metadata">

### Author: ![nodomain](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nodomain/32/303402_2.png) [@nodomain](https://meta.discourse.org/u/nodomain)
#### Post date: [April 27, 2023, 8:57am UTC](https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326/6 "2023-04-27T08:57:54Z")

</div>

I switched to the [Oauth2 Basic](https://github.com/discourse/discourse-oauth2-basic) plugin. Problem solved.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 27, 2023, 8:58am UTC](https://meta.discourse.org/t/cannot-add-additional-parameters-to-authorize-endpoint/262326/7 "2023-05-27T08:58:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
