Replies: 10 comments 1 reply
-
Welcome @Bogidon 👋 Oh, I see, something like a shared authentication store that you could reference on requests? Seems like a really good idea actually. I'm wondering if it could be used more than just authentication. @gschier is there anything like this in the app currently? |
Beta Was this translation helpful? Give feedback.
-
There was a discussion a long time ago under the feature "Parent Requests" but it was abandoned for various reasons: #598 For OAuth 2.0, specifically, someone has created a plugin that allows referencing the Access Token from a different request. That way you only have to define the information once. This should solve your immediate problem of manually copying the token into the environment: https://insomnia.rest/plugins/insomnia-plugin-accesstoken In general, I like the idea of being able to reference parts of other requests. I think this provides the most flexibility while not overcomplicating the existing UI/UX. |
Beta Was this translation helpful? Give feedback.
-
👋 In general +1 to referencing parts of other requests. Though, to me the clearest way for auth to work would be if you can declare an auth strategy that can be applied to multiple requests, that would internally only rerun as necessary. That would remove the "oh you have to run this special request first". Thanks for the plugin. I tried a different one a while ago that I couldn't get working, so I'll give this one a shot. |
Beta Was this translation helpful? Give feedback.
-
@gschier @nijikokun ping that we'd likely pay for Insomnia were this implemented. |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Beta Was this translation helpful? Give feedback.
-
Would be really cool to be able to copy-paste Auth from one endpoint to others. For example, I setup Auth as Bearer and specify token to be used from response body of another endpoint. Now I can copy-paste token value, but still have to choose Auth -> Bearer, and then paste token value. What would make it simpler is to copy whole Auth settings, and then paste them to another endpoints with some hotkey/context menus. Or better — to link Auth to one of endpoints, so it can be updated later in a single place. Maybe mark endpoint with "auth" label then for visual distinction etc. Postman for example can inherit Auth. |
Beta Was this translation helpful? Give feedback.
-
After starting with insomnia, I was very happy to see the OAuth2 authentication working with our internal OAuth2 provider - even the authorization code flow works 🎉 . Not sure though how to pair this with the different environments. We have one OAuth2 provider per environment (staging, production) and this should be switched also when changing the environment. |
Beta Was this translation helpful? Give feedback.
-
This is the main thing preventing us from switching from Postman. |
Beta Was this translation helpful? Give feedback.
-
Hello, We will look into folder-level authentications, global environments immediately after the release of v9.0 at the end of the month. These capabilities are top of mind. |
Beta Was this translation helpful? Give feedback.
-
Aiming to deliver this in #7353 |
Beta Was this translation helpful? Give feedback.
-
Describe the solution you'd like
Describe alternatives you've considered
Currently I have one endpoint that has the auth mechanism (OAuth 2) set up. I copy the returned bearer token into the environment config. When the token expires in 2 hours, we have to do the whole process again, including logging into our auth provider. Many of my coworkers consider this too cumbersome to want to use Insomnia.
Additional context
I think if Insomnia had an easy way to do this, we'd have had a few monthly licenses by now.
Beta Was this translation helpful? Give feedback.
All reactions