Skip to content

Latest commit

 

History

457 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Passport App

This is a MERN (Mongo, Express, React, Node) stack application which put forward several types of authentication strategy (Local, JWT, Facebook, Google) using Passport JS.

Commands to run the application

In the project directory, you can

  • Use npm package manager:
# First, run the backend
cd back/
npm install
npm start
# Then, run the frontend
cd front/
npm install
npm start
docker-compose build
docker-compose up

Open http://localhost:3000 to view it in the browser.

Technologies

Enable Facebook and Google Authentication

To obtain your API ID for Facebook and Google, please create a project on the two following links :

Then, define a .env file on the back folder like this :

# Facebook ID
FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
FACEBOOK_CALLBACK_URL=http://localhost:8000/auth/facebook/callback
# Google ID
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_CALLBACK_URL=http://localhost:8000/auth/google/callback

Additionnal informations

Defaults ports :

Frontend : 3000
Backend : 8000

You can also put some variables informations on the .env file :

# Back-end informations
TITLE=MyApp
SERVER_PORT=8000
NODE_ENV=production
# Mongo DB url
MONGODB_URL=mongodb://localhost:27017/passport-app
# JWT secret key
JWT_KEY=<my_secret_key>

Screenshots

default_page

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages