Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Commit

Permalink
#170947548 Login with Facebook and Google (#22)
Browse files Browse the repository at this point in the history
* ft(Login with Facebook and Google):

Install passport, passport-facebook, and passport-google-oauth
Setup apps on google developer console and facebook facebook developer
Write passport configuration file with facebook and google
create a getProfile callback function.
Setup routes for google and facebook redirecting
Initialise passport in index.js

[ #170947548 in progress]

* minor changes to the facebook oauth

* fixed facebook

* fixed tests

* fixed some bugs in the controller
wrote tests for the controller

[ Finishes #170947548 ]

 Please enter the commit message for your changes. Lines starting
  • Loading branch information
Jim Ntare committed Feb 19, 2020
1 parent 2f30131 commit 243dc55
Show file tree
Hide file tree
Showing 15 changed files with 522 additions and 11 deletions.
11 changes: 11 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ databaseName={your db Name}
passwordHashSalt=
JWTPRIVATEKEY=''
sendgridKey=


#### GOOGLE OAUTH #####
clientID=
clientSecret=
cookieSession=


##### FACEBOOK OAUTH ######
fbAppID=
fbAppSecret=
216 changes: 214 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"seed": "npx sequelize db:seed:all --env test",
"seed:dev": "npx sequelize db:seed:all",
"drop": "npx sequelize db:migrate:undo:all",
"cover": "nyc --reporter=html --reporter=text npm test",
"coverage": "nyc report --reporter=text-lcov | coveralls"
},
"author": "Andela Simulations Programme",
Expand All @@ -33,18 +34,23 @@
"babel-loader": "^8.0.6",
"bcrypt": "^3.0.8",
"body-parser": "^1.19.0",
"cookie-session": "^1.4.0",
"dotenv": "^6.2.0",
"express": "^4.17.1",
"express-validator": "^6.4.0",
"i18n": "^0.8.5",
"jsonwebtoken": "^8.5.1",
"localStorage": "^1.0.4",
"mailgen": "^2.0.10",
"passport": "^0.4.1",
"passport-facebook": "^3.0.0",
"passport-google-oauth20": "^2.0.0",
"path": "^0.12.7",
"pg": "^7.18.1",
"pg-hstore": "^2.3.3",
"sequelize": "^5.21.3",
"sequelize-cli": "^5.5.1",
"sinon": "^8.1.1",
"swagger-jsdoc": "^3.5.0",
"swagger-ui-express": "^4.1.3",
"uuid": "^3.4.0"
Expand Down
Loading

0 comments on commit 243dc55

Please sign in to comment.