[GH-ISSUE #3713] [bug]: Authorization on Collection level does not work #1285

Closed
opened 2026-03-16 19:37:56 +03:00 by kerem · 2 comments
Owner

Originally created by @PhilippPHoffmann on GitHub (Jan 3, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3713

Originally assigned to: @anwarulislam on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I move the Authorization settings from Request level to the Collection level, I see the following error message when I click Generate Token:
auth server error

What I expect is that the token is successfully generated and populated in the corresponding field in the dialog and subsequent Requests in this Collection.

Steps to reproduce

  1. Start with a successful Request that uses OAuth 2.0 Authorization
  2. Move the Authorization settings from Request level to Collection level
    • In my case this means entering the OpenID Connect Discovery URL, Authorization URL, ' Access Token URLandClient ID`
    • I do not need to specify Client Secret and Scope
  3. Click on Generate Token
  4. See error: Auth Server returned an error state

Please note that this error does not occur, when you enter any value in the Scope field and then remove it before clicking on Generate Token.
Therefore I suspect that this field or the corresponding variable is not properly initialized or passed to the URL.
Without this workaround, I can see scope=undefined in the resulting request. Using the workaround, this turns into scope=, which is what I expected because this is also used in the Request level Authorization.

Unfortunately the workaround does not completely fix Collection level Authorization.
When I click on Generate Token after using the workaround, I see a different error:
client secret error

I do not need to specify a Client Secret on the Request level Authorization and the workaround for the Scope does not work for the Client Secret.

Environment

Production

Version

Self-hosted

Originally created by @PhilippPHoffmann on GitHub (Jan 3, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3713 Originally assigned to: @anwarulislam on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When I move the Authorization settings from Request level to the Collection level, I see the following error message when I click `Generate Token`: ![auth server error](https://github.com/hoppscotch/hoppscotch/assets/155558968/95b32ae4-0747-431b-8258-9b19f3eac758) What I expect is that the token is successfully generated and populated in the corresponding field in the dialog and subsequent Requests in this Collection. ### Steps to reproduce 1. Start with a successful Request that uses OAuth 2.0 Authorization 2. Move the Authorization settings from Request level to Collection level - In my case this means entering the `OpenID Connect Discovery URL`, `Authorization URL`, ' Access Token URL` and `Client ID` - I do not need to specify `Client Secret` and `Scope` 3. Click on `Generate Token` 4. See error: `Auth Server returned an error state` Please note that this error does not occur, when you enter any value in the `Scope` field and then remove it before clicking on `Generate Token`. Therefore I suspect that this field or the corresponding variable is not properly initialized or passed to the URL. Without this workaround, I can see `scope=undefined` in the resulting request. Using the workaround, this turns into `scope=`, which is what I expected because this is also used in the Request level Authorization. Unfortunately the workaround does not completely fix Collection level Authorization. When I click on `Generate Token` after using the workaround, I see a different error: ![client secret error](https://github.com/hoppscotch/hoppscotch/assets/155558968/f499c68f-3615-4440-b966-415f2d2aafcd) I do not need to specify a `Client Secret` on the Request level Authorization and the workaround for the `Scope` does not work for the `Client Secret`. ### Environment Production ### Version Self-hosted
kerem 2026-03-16 19:37:56 +03:00
Author
Owner

@anwarulislam commented on GitHub (Mar 5, 2025):

@PhilippPHoffmann, do you still experience this issue? It was supposed to be resolved.

<!-- gh-comment-id:2700696869 --> @anwarulislam commented on GitHub (Mar 5, 2025): @PhilippPHoffmann, do you still experience this issue? It was supposed to be resolved.
Author
Owner

@PhilippPHoffmann commented on GitHub (Mar 5, 2025):

I can't reproduce this issue anymore.

<!-- gh-comment-id:2701214891 --> @PhilippPHoffmann commented on GitHub (Mar 5, 2025): I can't reproduce this issue anymore.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1285
No description provided.