thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.64k stars 130 forks source link

Authentication details on Environment #1358

Closed bensonrlee closed 8 months ago

bensonrlee commented 1 year ago

Please describe feature/problem details and the solution you'd like. Right now, authentication details (username and password, etc), can be linked at the collection level. Is it possible to link authentication details based on the environment.

For example, I can have same API endpoints (except for base URL) on dev and prod, but the credentials in dev and prod would not be the same.

Describe alternatives you've considered

  1. Update the authentication details depending on the environment being tested.
  2. Duplicate the collection and link the second collection to the second environment.
rangav commented 1 year ago

Hi @bensonrlee

You can use env variables in authentication fields, e.g {{username}} and {{password}}

and use different values in Staging, and production environments. When you change the active environment, it will change values accordingly.

metamoof commented 10 months ago

Hi Is it possible to change from Basic to OAuth depending on the evironment?