postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.81k stars 839 forks source link

Add pre-request scripts to access token generator #7856

Open simonhamp opened 4 years ago

simonhamp commented 4 years ago

Is your feature request related to a problem? Please describe. I am trying to use a variable in the name of an Access Token when generating OAuth2 tokens via the 'Generate New Access Token' UI. The variable I want to use doesn't exist ($now) at that point in time, but I was hoping that the pre-request scripts would also apply to token requests. Sadly, they appear not to.

Describe the solution you'd like Add an option to execute pre-request scripts when generating tokens.

Describe alternatives you've considered I've considered generating the token in a collection/request pre-request script, however this isn't as easy to keep multiple tokens around and doesn't really support the full OAuth2 3-step auth code flow.

Additional context I think it would be great if there was a simple expandable section here that allowed me to enter a pre-request script that would run just before the auth request gets made after clicking 'Request Token':

Screenshot 2019-12-30 at 17 15 35
mancave commented 3 years ago

Looks like the same feature #10008