jupapios / oauth-proxy

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:ISC License


Languages

Language:JavaScript 100.0%