[PR #5253] [MERGED] feat(common): add advanced configuration for auth and token request parameters #5127

Closed
opened 2026-03-17 02:36:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5253
Author: @anwarulislam
Created: 7/16/2025
Status: Merged
Merged: 7/28/2025
Merged by: @jamesgeorge007

Base: nextHead: feat/oauth2-audience-field


📝 Commits (10+)

  • 1b384bf feat: add advanced configuration for auth and token request parameters
  • 12a879c feat: implement advanced OAuth2 configuration with dynamic request parameters
  • d5e520c feat: enhance OAuth2 advanced options with improved UI and parameter handling
  • bb2c063 feat: add advanced OAuth2 components for enhanced parameter handling
  • 6351c11 feat: add showDescription prop to HttpKeyValue component and remove OAuth2KeyValue component
  • f19993b feat: enhance UI for auth request parameters with column headers and improved layout
  • 2e8137b feat: implement advanced OAuth2 parameters handling
  • 50a0fae feat: add support for OAuth2 advanced parameters and update versioning to 15
  • 8ff28a4 feat: add advanced configuration for OAuth2 auth request parameters management
  • 1033961 feat: add autoCompleteEnv prop to KeyValue

📊 Changes

24 files changed (+1426 additions, -113 deletions)

View changed files

📝 packages/hoppscotch-cli/src/__tests__/unit/fixtures/workspace-access.mock.ts (+13 -13)
📝 packages/hoppscotch-cli/src/utils/workspace-access.ts (+70 -17)
📝 packages/hoppscotch-common/locales/en.json (+5 -1)
📝 packages/hoppscotch-common/src/components.d.ts (+3 -1)
📝 packages/hoppscotch-common/src/components/http/KeyValue.vue (+32 -16)
📝 packages/hoppscotch-common/src/components/http/authorization/OAuth2.vue (+701 -3)
📝 packages/hoppscotch-common/src/helpers/auth/index.ts (+4 -0)
📝 packages/hoppscotch-common/src/helpers/graphql/connection.ts (+1 -1)
📝 packages/hoppscotch-common/src/helpers/kernel/__tests__/kernel.spec.ts (+7 -7)
packages/hoppscotch-common/src/helpers/oauth2Params.ts (+59 -0)
📝 packages/hoppscotch-common/src/services/oauth/flows/authCode.ts (+71 -10)
📝 packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts (+5 -5)
📝 packages/hoppscotch-data/src/collection/index.ts (+4 -2)
packages/hoppscotch-data/src/collection/v/9.ts (+92 -0)
📝 packages/hoppscotch-data/src/graphql/index.ts (+5 -3)
packages/hoppscotch-data/src/graphql/v/9.ts (+94 -0)
📝 packages/hoppscotch-data/src/rest-request-response/original-request/index.ts (+4 -2)
packages/hoppscotch-data/src/rest-request-response/original-request/v/6.ts (+65 -0)
📝 packages/hoppscotch-data/src/rest/index.ts (+14 -14)
packages/hoppscotch-data/src/rest/v/15/auth.ts (+90 -0)

...and 4 more files

📄 Description

Closes FE-903 #3387

What's changed

Allows users to add custom key-value pairs, such as audience, grant_type, and others, to OAuth2 request inputs to support various providers like Auth0.

Test request

https://hopp.sh/r/sptx3b7lwvqm

Test Collection

oauth2-audience.json

Note to reviewer

  • Right now, advanced params like authRequestParams, tokenRequestParams, and refreshRequestParams only work with the Authorization Code grantType. But the code is set up to easily add support for the other three grant types. We’ll roll those out in the next patch release. I wanted to keep this PR focused on just one grant type so we can get it into this release.
  • You can download the collection where the credentials are set up in the request variables. Feel free to pass a wrong audience to test it out. It'll fail if the audience is off. The right audience to authorize is https://api.example.com.
image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5253 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 7/16/2025 **Status:** ✅ Merged **Merged:** 7/28/2025 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `feat/oauth2-audience-field` --- ### 📝 Commits (10+) - [`1b384bf`](https://github.com/hoppscotch/hoppscotch/commit/1b384bf9630df0f86d8c28c29781236edb6657f2) feat: add advanced configuration for auth and token request parameters - [`12a879c`](https://github.com/hoppscotch/hoppscotch/commit/12a879c483641455c6243449a2432ed413e66a61) feat: implement advanced OAuth2 configuration with dynamic request parameters - [`d5e520c`](https://github.com/hoppscotch/hoppscotch/commit/d5e520c5799afcb807f70c2f5f57b68cf557466d) feat: enhance OAuth2 advanced options with improved UI and parameter handling - [`bb2c063`](https://github.com/hoppscotch/hoppscotch/commit/bb2c0634d5363fa8ef65b91f32f7b05404fb3bb0) feat: add advanced OAuth2 components for enhanced parameter handling - [`6351c11`](https://github.com/hoppscotch/hoppscotch/commit/6351c119c6e3a28df4c3ca5ec41f23b187578d5e) feat: add showDescription prop to HttpKeyValue component and remove OAuth2KeyValue component - [`f19993b`](https://github.com/hoppscotch/hoppscotch/commit/f19993b3c6d89e75b99929f1fdab1745d15b99b2) feat: enhance UI for auth request parameters with column headers and improved layout - [`2e8137b`](https://github.com/hoppscotch/hoppscotch/commit/2e8137bc5b80be0e61ac1932acd0746507e925e8) feat: implement advanced OAuth2 parameters handling - [`50a0fae`](https://github.com/hoppscotch/hoppscotch/commit/50a0fae74b260f84929bb5c697695cabc89a588c) feat: add support for OAuth2 advanced parameters and update versioning to 15 - [`8ff28a4`](https://github.com/hoppscotch/hoppscotch/commit/8ff28a4361bd3a29900c9b1bbf91e595cc028d2d) feat: add advanced configuration for OAuth2 auth request parameters management - [`1033961`](https://github.com/hoppscotch/hoppscotch/commit/1033961d755be3746094726eb5c943cedc0e406a) feat: add autoCompleteEnv prop to KeyValue ### 📊 Changes **24 files changed** (+1426 additions, -113 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-cli/src/__tests__/unit/fixtures/workspace-access.mock.ts` (+13 -13) 📝 `packages/hoppscotch-cli/src/utils/workspace-access.ts` (+70 -17) 📝 `packages/hoppscotch-common/locales/en.json` (+5 -1) 📝 `packages/hoppscotch-common/src/components.d.ts` (+3 -1) 📝 `packages/hoppscotch-common/src/components/http/KeyValue.vue` (+32 -16) 📝 `packages/hoppscotch-common/src/components/http/authorization/OAuth2.vue` (+701 -3) 📝 `packages/hoppscotch-common/src/helpers/auth/index.ts` (+4 -0) 📝 `packages/hoppscotch-common/src/helpers/graphql/connection.ts` (+1 -1) 📝 `packages/hoppscotch-common/src/helpers/kernel/__tests__/kernel.spec.ts` (+7 -7) ➕ `packages/hoppscotch-common/src/helpers/oauth2Params.ts` (+59 -0) 📝 `packages/hoppscotch-common/src/services/oauth/flows/authCode.ts` (+71 -10) 📝 `packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts` (+5 -5) 📝 `packages/hoppscotch-data/src/collection/index.ts` (+4 -2) ➕ `packages/hoppscotch-data/src/collection/v/9.ts` (+92 -0) 📝 `packages/hoppscotch-data/src/graphql/index.ts` (+5 -3) ➕ `packages/hoppscotch-data/src/graphql/v/9.ts` (+94 -0) 📝 `packages/hoppscotch-data/src/rest-request-response/original-request/index.ts` (+4 -2) ➕ `packages/hoppscotch-data/src/rest-request-response/original-request/v/6.ts` (+65 -0) 📝 `packages/hoppscotch-data/src/rest/index.ts` (+14 -14) ➕ `packages/hoppscotch-data/src/rest/v/15/auth.ts` (+90 -0) _...and 4 more files_ </details> ### 📄 Description Closes FE-903 #3387 ### What's changed Allows users to add custom key-value pairs, such as `audience`, `grant_type`, and others, to OAuth2 request inputs to support various providers like Auth0. ### Test request [https://hopp.sh/r/sptx3b7lwvqm](https://hopp.sh/r/sptx3b7lwvqm) ### Test Collection [oauth2-audience.json](https://github.com/user-attachments/files/21471877/oauth2-audience.json) ### Note to reviewer - Right now, advanced params like `authRequestParams`, `tokenRequestParams`, and `refreshRequestParams` only work with the `Authorization Code` grantType. But the code is set up to easily add support for the other three grant types. We’ll roll those out in the next patch release. I wanted to keep this PR focused on just one grant type so we can get it into this release. - You can download the collection where the credentials are set up in the request variables. Feel free to pass a wrong `audience` to test it out. It'll fail if the audience is off. The right audience to authorize is `https://api.example.com`. <img width="1137" height="778" alt="image" src="https://github.com/user-attachments/assets/be550877-a593-4cc3-9556-16bd87d580e6" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:36:16 +03:00
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#5127
No description provided.