Implementing Passport authentication with promises
up vote
0
down vote
favorite
Here is code implementing Passport authentication with a Google Strategy. It uses Mongoose to store and retrieve user data. You might need to be familiar with both of these technologies to review this code if not check out the two links I provided. I have included only the Passport file. I was told I am not using promises correctly and would like to rectify this if it is in fact true. The code is full of comments below. Please let me know if more clarification or context is needed. Thanks for any feedback. Passport const passport = require('passport'); const GoogleStrategy = require('passport-google-oauth').OAuth2Strategy; const DBM = require('../../database/mongoose'); const helper = require('../../config/helper'); // review this post // https://stacko...