Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.17k stars 1.92k forks source link

bearer token from a file #3157

Open yosiasz opened 3 years ago

yosiasz commented 3 years ago

Is your feature request related to a problem? Please describe. I'm always frustrated when I have to provide a bearer token manually

Describe the solution you'd like Allow for insomnia to point to a local app.settings file from any applications for each workspace

Describe alternatives you've considered None, hence the reason for me showing up here :)

Additional context Getting tired of manual token entry. Such a let down for such an AMAZING tool

develohpanda commented 3 years ago

Hello! Are you familiar with environment variables in Insomnia? You can store your auth token in an environment variable and reference it in the bearer token field.

image

Of course this way the variable is still stored within Insomnia and is not loading from a local file. We recently published a blog post describing use of the insomnia-plugin-dotenv plugin to load environment variables from local .env files.

I encourage you to run through that blog post as I am confident that it will cater to your use case. 😄

yosiasz commented 3 years ago

Hello, so exactly what I dont want to which is env var because tokens change. So want to ref a file that has my token that gets generated by some other build process

develohpanda commented 3 years ago

No worries, using insomnia-plugin-dotenv is just an example. You could create a custom plugin to read from a file in a way you specify, and use a process inspired by the solution in that blog post.

stale[bot] commented 3 years ago

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.

yosiasz commented 3 years ago

Still wishing for it to point to an appsettings file