mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5287] [MERGED] feat(common): support advanced parameters in implicit, password, and client_credentials grant types #5143
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5287
Author: @anwarulislam
Created: 7/29/2025
Status: ✅ Merged
Merged: 8/27/2025
Merged by: @jamesgeorge007
Base:
next← Head:feat/enhance-oauth2📝 Commits (10+)
1e3108crefactor(auth): simplify sendInOptions structure and add labels53fa468feat: add advanced OAuth2 parameters management and grant types handling3dd7cc1refactor: reorder sendInOptions and update labels for clarityb4a2d37refactor: streamline parameter preparation by introducing prepareRequestParams function63a7b0cfeat: password flow with token request and refresh parameters handlingcf118e4feat: Implicit OAuth flow to include authRequestParams and refreshRequestParams handling45d8d45feat: implement refresh token handling and enhance token request parameter managementa5a60abfeat: implement unified refresh token function for all OAuth flowse1c9ba5feat: enhance request parameter handling by introducing computed properties for auth, token, and refresh request parameters9078cdcfix: remove conditional rendering for authCode grant type to simplify template structure📊 Changes
9 files changed (+1676 additions, -1396 deletions)
View changed files
📝
packages/hoppscotch-common/src/components/http/authorization/OAuth2.vue(+195 -1204)➕
packages/hoppscotch-common/src/composables/oauth2/useOAuth2AdvancedParams.ts(+301 -0)➕
packages/hoppscotch-common/src/composables/oauth2/useOAuth2GrantTypes.ts(+824 -0)📝
packages/hoppscotch-common/src/helpers/oauth2Params.ts(+6 -14)📝
packages/hoppscotch-common/src/services/oauth/flows/authCode.ts(+5 -74)📝
packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts(+115 -52)📝
packages/hoppscotch-common/src/services/oauth/flows/implicit.ts(+33 -12)📝
packages/hoppscotch-common/src/services/oauth/flows/password.ts(+75 -40)➕
packages/hoppscotch-common/src/services/oauth/utils.ts(+122 -0)📄 Description
Added support for advanced parameters in
implicit,passwordandclient_credentialsgrant types. And refactor the OAuth2 component.Note for reviewers
Download and import the collection(auth-types.json). All necessary credentials are there already. There's a sample backend code in a comment. You can run it to test the token.
1. Test implicit flow.
If you generate a token for the right audience, it'll be valid, and you'll get a successful response. If not, the server will throw an error message.
2. Test password flow.
/audiencewith/oauth/tokenToken Requestsection inAdvanced SettingsIf you generate a token for the right audience, it'll be valid, and you'll get a successful response. If not, the server will throw an error message.
3. Test credentials flow.
/audiencewith/oauth/tokenToken Requestsection inAdvanced Settings<<client_m2m>>and<<secret_m2m>>. The credentials grant type only works with machine-to-machine.If you don't pass the right audience, the token will not be generated and you'll get error response.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.