Git Product home page Git Product logo

passport-oauth-example's Introduction

Passport OAuth Example

Simple web application that uses OAuth2 to log in for demonstration purposes.

Simply log in using the provided credentials in the challenge PDF and a profile view will be provided.

Installing

You will need to copy .env.example to .env to start with, and add the required parameters. This is to ensure critical secrets are kept in the environment.

Environment variables are:

PORT=3000
IP=0.0.0.0
AUTHORIZATION_URL=[HOST]/oauth/authorize
TOKEN_URL=[HOST]/oauth/token
CLIENT_ID=[id]
CLIENT_SECRET=[secret]
CALLBACK_URL=http://localhost:3000
USER_INFO=[HOST]/oauth/userinfo

Building, running and testing

Building

  • npm run build will do a build - it triggers grunt. This has not been added into a trigger but can be if needed.
  • npm run watch triggers grunt watch and looks out for changes.

Running

  • npm start will run the server - it'll require a npm run build. This is equivalent to node -r esm server.js - this is explained in COVER.md.

Testing

  • npm test will trigger grunt test which will run linting and unit testing.
  • npm run coverage will trigger the tests and output a code coverage report.

passport-oauth-example's People

Contributors

danwdart avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.