Git Product home page Git Product logo

nodejs-google-idp-sample's Introduction

Authentication and Authorization using OAuth2

This repository contains an example of using Google as Identity Provider for authentication. For this example, we used NodeJS as the backend and VueJS as the frontend. The backend is available in demo/api and frontend in demo/ui.

Build Presentation Content

npm install reveal-md -g
npm install gulp-cli -g
npm install

Build content into output directory dist:

gulp build

Start presentation with reveal-md

gulp present

If you get an error Error: listen EADDRINUSE :::35729, make sure that you are not running any other instance of reveal-md using ps aux | grep reveal-md

Demo

Install http-server

npm i -g http-server

Start API server

cd demo/api
npm install
npm start

This should listen on http://127.0.0.1:3000

Start UI

cd demo/ui
http-server

This should listen on http://localhost:8080. In case of different host/port, the appropriate origin has to be updated in Google oauth2 credentials settings.

Google client credential identifier is hardcoded in demo/ui/index.html. The following code needs to be changed:

<meta name="google-signin-client_id" content="323026488616-o837nl9ddichgi4gttalsq6voabfh2mb.apps.googleusercontent.com">

nodejs-google-idp-sample's People

Contributors

abhisek 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.