Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svengau/netlify-authentification-sample
Authentication with netlify lambda functions, PassportJS and Express
https://github.com/svengau/netlify-authentification-sample
Last synced: 3 days ago
JSON representation
Authentication with netlify lambda functions, PassportJS and Express
- Host: GitHub
- URL: https://github.com/svengau/netlify-authentification-sample
- Owner: svengau
- Created: 2019-10-28T07:43:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-26T18:50:33.000Z (7 months ago)
- Last Synced: 2024-04-26T20:50:54.144Z (7 months ago)
- Language: JavaScript
- Size: 1.65 MB
- Stars: 9
- Watchers: 3
- Forks: 3
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example of netlify authentication with Passportjs
[![Netlify Status](https://api.netlify.com/api/v1/badges/9d1ad709-2dcc-4c6f-afa5-8a4b65dc2ed1/deploy-status)](https://app.netlify.com/sites/netlify-authentification-sample/deploys)
This project shows how to use the very popular [PassportJS](http://www.passportjs.org) library (normally available under expressjs) with the [Netlify](https://www.netlify.com/) platform running under AWS Lambda.
We took the example of [Google OAuth](http://www.passportjs.org/packages/passport-google-oauth/), but you can use any [PassportJS strategy](http://www.passportjs.org/packages/) (Twitter, Facebook, Local, JWT, Github, ...).
You can clone on you local with:
[email protected]:svengau/netlify-authentification-sample.git
Alternatively you can deploy straight to Netlify with this one-click Deploy:
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg?utm_source=github)](https://app.netlify.com/start/deploy?repository=https://github.com/svengau/netlify-authentification-sample&utm_source=github)
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/