mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 17:26:03 +03:00
[GH-ISSUE #5478] [feature]: Automatic OAuth 2.0 Token Generation on Collection Run #2103
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#2103
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?
Originally created by @Leon-Luu on GitHub (Oct 10, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5478
Is there an existing issue for this?
Summary
Summary:
Currently, Hoppscotch requires users to manually generate an OAuth 2.0 token from the Collection Properties before running a collection. We propose that, instead, Hoppscotch should always trigger the OAuth 2.0 token generation process automatically once at the start of a collection run. The generated token should then be used for all child requests within that collection.
Description:
The current workflow introduces unnecessary manual steps and risk of using outdated tokens. When running a collection that uses OAuth 2.0, users must go to Collection Properties and click "Generate Token" before execution. This is not ideal for automation or streamlined workflows.
Proposed Enhancement:
When a user initiates a collection run, Hoppscotch should always trigger the OAuth 2.0 token generation or refresh process at the very start of the run, regardless of token status.
The newly generated token should be set and shared automatically for all child requests within the collection that require OAuth 2.0 authentication.
Users should not need to open Collection Properties or press any buttons—the process should be fully automatic as part of the collection execution flow.
Optionally, provide feedback or logs to inform users that the token was generated at the start of the run.
Why should this be worked on?
Key Points:
Single Token Generation: Only one token generation per collection run, not per request.
Token Propagation: The generated token applies to all child requests within the collection.
No Manual Steps: Eliminates the need for manual interaction in the Collection Properties panel.
Benefits:
Streamlined Workflow: Simplifies the process for users running collections, especially in automated or CI/CD environments.
Consistency: Ensures all requests in the collection use a fresh, valid token generated at the time of execution.
Reliability: Reduces the risk of authentication failures due to forgotten or expired tokens.
@Ajaychaki2004 commented on GitHub (Nov 9, 2025):
Hi, I’d like to work on the automatic OAuth 2.0 token generation feature (Issue : #5478). @liyasthomas Could you please assign me to the issue or let me know if there are any existing PRs or design docs I should check first? Thanks!
@Leon-Luu commented on GitHub (Nov 12, 2025):
@liyasthomas @AndrewBastin Please have a look into this. I have implemented this to https://github.com/hoppscotch/hoppscotch/pull/5575 . It has been tested and works fine both in Hoppscotch UI and CLI mode. This is really something users want to have.