Replies: 5 comments 4 replies
-
I would love to have this features as well. Like in Postman "setEnvironmentVariable". |
Beta Was this translation helpful? Give feedback.
-
This is a nice and important feature 👍 |
Beta Was this translation helpful? Give feedback.
-
I was struggling with this for a while, but i realized that with help of a simple plugin I can make it with:
While i think it would be nice to |
Beta Was this translation helpful? Give feedback.
-
@develohpanda It seems like the plugin system has a few plugins to allow this kind of functionality, but it's not ideal. |
Beta Was this translation helpful? Give feedback.
-
Thanks for tagging me @Eddie-Hartman, there's a lot of activity and unfortunately some things go under the radar. Tagging @wdawson here, Wils is our new PM for Insomnia and will be the one who can help prioritise. As a previous comment mentions this is certainly an involved piece of work but I can see a way in which it could work. |
Beta Was this translation helpful? Give feedback.
-
What is your question?
I'm using JWT authentication. I have a /SignIn endpoint and a /Refresh endpoint. Both of them return the same data model, which includes an access token. I'd like to save the last called endpoint to an environment variable called "accessToken". Is this possible?
What is the context?
In my scenario, the user signs in using the /SignIn endpoint. I then save the response to an environment variable called "accessToken". After a certain amount of time that access token will expire, so they need to refresh it by calling the /Refresh endpoint. Because of this call, the original "accessToken" variable is no longer valid. I would like to update the variable to use the new, valid, access token from the /Refresh endpoint.
My understanding of both "chaining" and "environment variables" is that they can only consume from a single endpoint.
Is there a way to do this?
Beta Was this translation helpful? Give feedback.
All reactions