GithubHelp home page GithubHelp logo

raaghav-1824 / google-authentication--nodejs Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 116 KB

Angela Yu's Web Development Udemy Course (section 32)

JavaScript 54.85% CSS 1.75% EJS 43.40%
angela-yu dotenv ejs express-session expressjs javascript mongodb nodejs oauth passport

google-authentication--nodejs's Introduction

Google-Authentication--NodeJs

In this project we simply use the passport google Strategy. Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application. A comprehensive set of strategies support authentication using a username and password, Facebook, Twitter, and more.

Configure Strategy

The Google authentication strategy authenticates users using a Google account and OAuth 2.0 tokens. The client ID and secret obtained when creating an application are supplied as options when creating the strategy.

Google Credentials

you must register an application with Google. If you have not already done so, a new project can be created in the Google Developers Console. Your application will be issued a client ID and client secret, which need to be provided to the strategy. You will also need to configure a redirect URI which matches the route in your application.

  1. Create a new project

  2. Select the project and click credentials and the select OAuth client ID

  3. Now Select Web Application in application type.

  4. Input your app name or whatever else you like , in Authorized JavaScript origins add this line 'http://localhost:3000' and in Authorized redirect URIs field add this line 'http://localhost:5000/auth/google/callback' and the click to create .

  5. Now copy your Google client ID and Google client secret.

Structure of Project

Project Structure

Install Dependencies

  • express
  • ejs
  • connect-mongo
  • dotenv
  • express-session
  • mongoose
  • passport
  • passport-google-oauth20

Usage

This project has no usage other than to present future employers of my progresss as a Full-Stack Web Developer.

Credits

  • Dr. Angela Yu
  • Udemy

google-authentication--nodejs's People

Contributors

raaghav-1824 avatar

Stargazers

 avatar  avatar

Watchers

 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.