diff options
| author | madelinegr <laura_wilson@brown.edu> | 2019-02-18 20:31:57 -0500 |
|---|---|---|
| committer | madelinegr <laura_wilson@brown.edu> | 2019-02-18 20:31:57 -0500 |
| commit | 0bf7b0764bc49fdd40e775f4a5ee6bfac056bc79 (patch) | |
| tree | e13272af751b33648b9842aa2ddcdf3a30ea1819 /src/server/authentication/config/passport.ts | |
| parent | 6fd2cec91efd6672a70e15a786954f92c1d23416 (diff) | |
merged with server
Diffstat (limited to 'src/server/authentication/config/passport.ts')
| -rw-r--r-- | src/server/authentication/config/passport.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/authentication/config/passport.ts b/src/server/authentication/config/passport.ts index 05f6c3133..9f1303135 100644 --- a/src/server/authentication/config/passport.ts +++ b/src/server/authentication/config/passport.ts @@ -18,7 +18,7 @@ passport.deserializeUser<any, any>((id, done) => { }); // AUTHENTICATE JUST WITH EMAIL AND PASSWORD -passport.use(new LocalStrategy({ usernameField: 'email' }, (email, password, done) => { +passport.use(new LocalStrategy({ usernameField: 'email', passReqToCallback: true }, (req, email, password, done) => { User.findOne({ email: email.toLowerCase() }, (error: any, user: any) => { if (error) return done(error); if (!user) return done(undefined, false, { message: "Invalid email or password" }) // invalid email |
