Code Monkey home page Code Monkey logo

fcc-social-auth's Introduction

FreeCodeCamp Social Authentication Challenge

Forked from the supplied boilerplate repository this repo will contain the output of the social authentication challenge on freeCodeCamp.

The basic path this kind of authentication will follow in your app is:

  1. User clicks a button or link sending them to our route to authenticate using a specific strategy (EG. GitHub)
  2. Your route calls passport.authenticate('github') which redirects them to GitHub.
  3. The page the user lands on, on GitHub, allows them to login if they aren't already. It then asks them to approve access to their profile from our app.
  4. The user is then returned to our app at a specific callback url with their profile if they are approved.
  5. They are now authenticated and your app should check if it is a returning profile, or save it in your database if it is not.

Local Development

You'll need an .env file with:

  1. GITHUB_CLIENT_ID
  2. GITHUB_CLIENT_SECRET
  3. MONGO_URI
  4. SESSION_SECRET

The rest is pretty straightforward, with npm for package management and nodemon for development server. Use npm run dev for starting up the local server.

Notable Packages/Concepts

  1. PassportJS
  2. PugJS
  3. Github OAuth for web applications
  4. MongoDB

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.