Simple proxy for the oauth service to keep the client_secret
and client_id
secret
npm install gotik/oauth-proxy --save
const 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 .env
Change the variables OAUTH_CLIENT_ID
, OAUTH_CLIENT_SECRET
and API_URL
in the file .env
npm start
Change your client apps to hit the oauth proxy http://localhost:3000
npm test