How to make requests to authenticated URLs without copying tokens back and forth.
I have to do it currently quite extensively and having short living JWTs is not making the situation any more convenient.
But there is always a solution. First I thought about automating that on my own but before I checked the Insomnia docs and found the exact solution I was looking for: Chaining Requests
Chaining requests allows you to perform an additional request before the actual request is being sent. It's super easy to use and it doesn't matter where the token is included in the login response. It can be retrieved via the response header or body or inside a defined cookie jar.
I created a little demo server to show how this works:
Finding this method was one of those eye opening moments where I wasted so much time before when the solution was always there and so convenient 🤯 Hopefully I can save someone some minutes with clicking and pasting tokens around 😊