sscarduzio / express-auth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of netlify authentication with Passportjs

Netlify Status

This project shows how to use the very popular PassportJS library (normally available under expressjs) with the Netlify platform running under AWS Lambda.

We took the example of Google OAuth, but you can use any PassportJS strategy (Twitter, Facebook, Local, JWT, Github, ...).

You can clone on you local with:

git@github.com:svengau/netlify-authentification-sample.git

Alternatively you can deploy straight to Netlify with this one-click Deploy:

Deploy to Netlify

Once deployed, don't forget to configure the 3 following env variables:

  • GOOGLE_AUTH_CLIENT_ID: your google client id
  • GOOGLE_AUTH_CLIENT_SECRET: your google client secret key
  • SESSION_SECRET: a random session secret

Live Demo

You may test out a deployed version of this project here: https://netlify-authentification-sample.netlify.com/

About


Languages

Language:JavaScript 80.9%Language:HTML 13.5%Language:CSS 5.7%