Added a brief comment explanation of how passport strategy works
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user