Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.38 KB

README.md

File metadata and controls

63 lines (41 loc) · 1.38 KB

oauth proxy CircleCI Build AppVeyor Build

Simple proxy for the oauth service to keep the client_secret and client_id secret

Usage

Heroku

Deploy

Custom app

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.

Development

Setup

1. Install the project

git clone https://github.com/gotik/oauth-proxy.git && cd oauth-proxy
npm install
cp .env.example .env

2. Set the env variables

Change the variables OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET and API_URL in the file .env

3. Run the proxy

npm start

4. Use the proxy in your clients

Change your client apps to hit the oauth proxy http://localhost:3000

Running Tests

npm test