A back-end program, that can manage user authentication. Users can register and login with a username + password combination, or with their Google/Facebook/GitHub accounts.
- Passport - Local/Google/Facebook/Github Authentication
- Mongoose - MongoDB
- EJS
- Express
- Node.js
- HTML5
- CSS3
- Bootstrap
Clone the repository:
git clone https://github.com/ArpadGBondor/The_App_Brewery-Back-end_project_06-Secrets.git
Enter directory:
cd The_App_Brewery-Back-end_project_06-Secrets/
Download the missing dependencies from npm:
npm install
Download, install and run MongoDB
You need to register your application to get ID and SECRET keys from Google, Facebook and GitHub.
(Google login registration)
(Facebook login registration)
(GitHub login registration)
Create a file named '.env' and set these enviroment variables:
PORT=3000
DB_USER_CONNECT=mongodb://localhost:27017/SecretsDB
APP_SESSION_SECRET=Any text that can be used as a session secret key
APP_COOKIE_SECRET=Any text that can be used as a cookie secret key
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URL=http://localhost:3000/auth/google/secrets
GOOGLE_PROFILE_URL=https://www.googleapis.com/oauth2/v3/userinfo
FACEBOOK_APP_ID=
FACEBOOK_APP_SECRET=
FACEBOOK_REDIRECT_URL=http://localhost:3000/auth/facebook/secrets
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_REDIRECT_URL=http://localhost:3000/auth/github/secrets
Run program:
node app.js
Send get request from browser:
Open: http://localhost:3000