diff --git a/config/passport.js b/config/passport.js index bbe25be6236..df371096782 100755 --- a/config/passport.js +++ b/config/passport.js @@ -38,6 +38,21 @@ passport.use(new LocalStrategy({ usernameField: 'email' }, function(email, passw }); })); +/** + * OAuth Strategy Overview + * + * - User is already logged in. + * - Check if there is an existing account with a provider id or email. + * - If there is, return an error message. (Account merging not supported) + * - Else link new OAuth account with currently logged-in user. + * - User is not logged in. + * - Check if it's a returning user. + * - If returning user, sign in and we are done. + * - Else check if there is an existing account with user's email. + * - If there is, return an error message. + * - Else create a new account. + */ + /** * Sign in with Facebook. */