Skip to content

Users directory and Oauth2 provider for organisations.

License

Notifications You must be signed in to change notification settings

D34THWINGS/LvConnect

 
 

Repository files navigation

LvConnect

This project aims to unify login over all LinkValue apps with an authentication service based on OAuth2.

Api reference

Below are listed all the endpoints available for now in the application.

Run in Postman

Public endpoints

  • /oauth (Authentication endpoint)

Protected endpoint

All the endpoints listed below are protected and require authentication with an access token. This token must be issued from the oauth endpoint (see documentation above). This token must be passed in the Authorization header as Bearer.

Hooks

Hooks allows your app to subscribe to LVConnect events, making sure that your user database is up to date with LVConnect.

Usage in your project

Some adapters are available for:

Installation

You will need to have on your machine:

If you have docker, you can launch directly theses services with docker-compose up.

Then run in your cloned folder:

yarn

If you want to work on this project, run:

yarn dev

Or if you want the production mode:

node .

The server listens to localhost:8000 in dev, lvconnect.herokuapp.com in staging andlvconnect.link-value.fr in production.

Configuration

The project requires a local configuration file containing Slack, Trello and Github API tokens. These config keys are not committed for security reasons, since they provide full access to target account. The required keys are:

module.exports = {
  trello: {
    apiKey: '',
    apiToken: '',
  },
  github: {
    apiToken: '',
  },
  slack: {
    apiToken: '',
  },
  mailjet: {
    apiKey: '',
    apiToken: '',
  },
};

This config file should be saved in config folder under the name local.js or local.json.

Deployment

LvConnect uses automatic deploy through CircleCI deploys. Staging environment is auto-deployed on each commit made upon master branch. Production environment release is auto-built upon tags on master branch, the build will have to be deployed manually by going into the CircleCI workflow of the build and triggering the deploy job.

To tag a release for production, use the npm version command which will bump version in package.json and generate the CHANGELOG.md file automatically.

CLI

LVConnect has a command line interface to help you do quick tasks. To run the cli, use the following command:

./packages/api/bin/cli.js [command] [...options]

Here's the command help (you can also access it by using the --help option):

Usage: cli [options] [command]


  Commands:

    create-superuser           Creates admin user with admin@link-value.fr/admin

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

About

Users directory and Oauth2 provider for organisations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 70.4%
  • HTML 23.2%
  • Gherkin 6.3%
  • Shell 0.1%