Simple proxy for the oauth service to keep the client_secret and client_id secret
npm install gotik/oauth-proxy --saveconst proxy = require('oauth-proxy');
const port = process.env.PORT || 3000;
proxy.listen(port, function() {
console.log(`oauth proxy server listening on port ${this.address().port}`);
});Remember to define the env variables.
git clone https://github.com/gotik/oauth-proxy.git && cd oauth-proxy
npm install
cp .env.example .envChange the variables OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET and API_URL in the file .env
npm startChange your client apps to hit the oauth proxy http://localhost:3000
npm test