Skip to content

MERN stack application using Passport Js and Docker

Notifications You must be signed in to change notification settings

Green1118/passport-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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:https://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:https://localhost:8000/auth/facebook/callback
# Google ID
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_CALLBACK_URL=http:https://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:https://localhost:27017/passport-app
# JWT secret key
JWT_KEY=<my_secret_key>

Screenshots

default_page

About

MERN stack application using Passport Js and Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 87.2%
  • HTML 5.9%
  • CSS 5.5%
  • Dockerfile 1.4%