[Bug] Switching environments will re-use a stale chained request value
See original GitHub issue- Insomnia Version: 5.12.4
- Operating System: Windows 10 Pro (10.0.16299.125)
Details
If a workspace contains a chained request value (e.g. a bearer token) and there is more than one environment (e.g. development and staging), if a request is executed in development that requires a chained request value, that value will persist if switching to the other environments.
Steps to Reproduce
- Create “Development” environment
- Create “Staging” environment
- Create POST request which retrieves OAuth 2.0 Bearer token
- Create GET request which requires
Authorization: Bearer <token>header - Fill Auth Bearer Token value with
Response => Body Attributemacro, executing the POST Token request from Step 3. - Execute request, and ensure bearer token was used in the request successfully
- Switch environments
- Execute the same request. Note that the previous bearer token was cached and used as part of the request (and, presumably, you will get either a 400 Bad Request or 401 Unauthorized error).
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Downstream pipelines - GitLab Docs
A pipeline in one project can trigger downstream pipelines in another project, called multi-project pipelines. The user triggering the upstream pipeline must be ......
Read more >SettingwithCopyWarning: How to Fix This Warning in Pandas
We have set a value on a copy of a slice but it was not detected by pandas – this is a false...
Read more >Dockerfile reference - Docker Documentation
Environment variables are notated in the Dockerfile either with $variable_name or ${variable_name} . They are treated equivalently and the brace syntax is ......
Read more >29. Cache Abstraction - Spring
In this case, each of the caches will be checked before executing the method - if at least one cache is hit, then...
Read more >Privilege Escalation Attack & Defense Explained - BeyondTrust
A standard user rarely has rights to a database, sensitive files, or anything of value. So, how does a threat actor navigate an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is very similar to issue #260 It would be awesome to see these 2 questions solved in a similar manner - like an option at the workspace level to reset all the stored responses/tokens when switching between environments.
Yep, now it won’t close 😄