'How to generate OAUTH2 token in SUPERTEST / NODEJS using clientid and client secret?
I am automating APIs using NPM-Supertest-javascript framework. Currently I am hardcoding the JWT access token (which I get from browser) and it works well. Now I am looking to automate the process of generating access token as well so that there will be no manual intervention.
I can generate the same access token using Postman where I input clientid, clientsecret, callback url, access token url, auth url and grant type etc.
As shown below:
How do I achieve the same using code (javascript-supertest) ? Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

