mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #4302] [MERGED] feat: ability to refresh tokens for oauth flows #4744
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#4744
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/4302
Author: @amk-dev
Created: 8/27/2024
Status: ✅ Merged
Merged: 8/29/2024
Merged by: @AndrewBastin
Base:
next← Head:feat/refresh-tokens-oauth📝 Commits (3)
ffb7e7cfeat: ability to refresh tokens2c057e3chore: fix a check for flows supporting token refreshb6a0fa5feat: support OAuth2 Authorization type in the CLI📊 Changes
20 files changed (+488 additions, -68 deletions)
View changed files
📝
packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts(+24 -0)➕
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/multipart-form-data-coll.json(+55 -0)➕
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/oauth2-auth-code-coll.json(+72 -0)📝
packages/hoppscotch-cli/src/__tests__/functions/request/requestRunner.spec.ts(+0 -3)📝
packages/hoppscotch-cli/src/interfaces/request.ts(+13 -4)📝
packages/hoppscotch-cli/src/utils/getters.ts(+9 -3)📝
packages/hoppscotch-cli/src/utils/pre-request.ts(+7 -0)📝
packages/hoppscotch-cli/src/utils/request.ts(+4 -43)📝
packages/hoppscotch-common/locales/en.json(+4 -0)📝
packages/hoppscotch-common/src/components/collections/graphql/index.vue(+5 -1)📝
packages/hoppscotch-common/src/components/collections/index.vue(+5 -1)📝
packages/hoppscotch-common/src/components/http/OAuth2Authorization.vue(+120 -2)📝
packages/hoppscotch-common/src/pages/oauth.vue(+13 -0)📝
packages/hoppscotch-common/src/services/oauth/flows/authCode.ts(+60 -1)📝
packages/hoppscotch-common/src/services/oauth/oauth.service.ts(+9 -0)📝
packages/hoppscotch-data/src/collection/v/3.ts(+3 -0)📝
packages/hoppscotch-data/src/graphql/index.ts(+1 -1)📝
packages/hoppscotch-data/src/graphql/v/6.ts(+28 -1)📝
packages/hoppscotch-data/src/rest/index.ts(+4 -8)📝
packages/hoppscotch-data/src/rest/v/7.ts(+52 -0)📄 Description
Fixes HFE-548
Changes
This PR adds the ability to refresh generated oauth tokens. We only enable refresh tokens for the
AuthCodeflow. for other flows it doesnt make much sense to add refresh token flows as per my reading. ( but incase we get user requests, we can easily add that ).The support for the OAuth 2 authorization type is extended to the CLI, relevant business logic to derive
Authorizationheaders already existed but a request with the Authorization type set tooauth-2was blocked previously reporting a status code of501which is changed herewith. This was also the case with themultipart/form-datacontent type which is enabled along with. Necessary updates are made to the test suite aimed at increasing coverage along with the relevant fixture additions.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.