[GH-ISSUE #5239] [feature]: Store auth tokens to environment variable #2001

Open
opened 2026-03-16 22:48:35 +03:00 by kerem · 2 comments
Owner

Originally created by @alambin on GitHub (Jul 11, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5239

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Could you please implement feature to store auth token in environment variable?
Right now if you perform authorization ex. by using "Authorization" tab in request window, you receive token, which you should either manually set in collection's Authorization property, either manually set it as environment variable. It would be much helpful if user could choose how it wants to receive token on "Authorization" tab - just as a text value, as it is done now, or it wants result to be automatically assigned to environment variable. In this case authorization could be fully automated - user just press "Generate Token", then token is received, stored in environment variable and all other requests can use updated token. No manual actions are involved.
As an option, it can be done by new type of elements, which collection may contain: ex. "Authorization". This element can have already existing interface (as in "Authorization" tab) and store token in env. variable as described above. This is even clearer solution, because user will not have to create new "request" element for authorization, where he will not execute request, but only use "Authorization" tab.

Why should this be worked on?

Improves user experience in authorization.

Originally created by @alambin on GitHub (Jul 11, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5239 ### Is there an existing issue for this? - [x] I have searched the existing issues ### Summary Could you please implement feature to store auth token in environment variable? Right now if you perform authorization ex. by using "Authorization" tab in request window, you receive token, which you should either manually set in collection's Authorization property, either manually set it as environment variable. It would be much helpful if user could choose how it wants to receive token on "Authorization" tab - just as a text value, as it is done now, or it wants result to be automatically assigned to environment variable. In this case authorization could be fully automated - user just press "Generate Token", then token is received, stored in environment variable and all other requests can use updated token. No manual actions are involved. As an option, it can be done by new type of elements, which collection may contain: ex. "Authorization". This element can have already existing interface (as in "Authorization" tab) and store token in env. variable as described above. This is even clearer solution, because user will not have to create new "request" element for authorization, where he will not execute request, but only use "Authorization" tab. ### Why should this be worked on? Improves user experience in authorization.
Author
Owner

@CloverAn commented on GitHub (Jul 15, 2025):

I fully agree with this requirement. I request this requirement to be implemented at the earliest opportunity. And not just Tokens, there may need to be 'body', 'headers', etc. Thank you.

<!-- gh-comment-id:3072178035 --> @CloverAn commented on GitHub (Jul 15, 2025): I fully agree with this requirement. I request this requirement to be implemented at the earliest opportunity. And not just Tokens, there may need to be 'body', 'headers', etc. Thank you.
Author
Owner

@shivas1432 commented on GitHub (Jul 22, 2025):

Hi! I've started working on this feature and made good progress:

Completed:

  • Created helper function to store tokens in environment variables
  • Analyzed the auth system architecture
  • Identified where the implementation needs to go

🔄 Next Steps:

  • Extend OAuth2/Bearer auth types to include storage options
  • Update UI to add "Store in Environment Variable" checkbox
  • Wire up the token generation to auto-store functionality

I'll continue working on this in the coming days. The foundation is solid and ready for the UI and type extensions. thank you

<!-- gh-comment-id:3102250645 --> @shivas1432 commented on GitHub (Jul 22, 2025): Hi! I've started working on this feature and made good progress: ✅ **Completed**: - Created helper function to store tokens in environment variables - Analyzed the auth system architecture - Identified where the implementation needs to go 🔄 **Next Steps**: - Extend OAuth2/Bearer auth types to include storage options - Update UI to add "Store in Environment Variable" checkbox - Wire up the token generation to auto-store functionality I'll continue working on this in the coming days. The foundation is solid and ready for the UI and type extensions. thank you
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#2001
No description provided.