diff options
| author | bobzel <zzzman@gmail.com> | 2024-04-30 01:10:20 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-04-30 01:10:20 -0400 |
| commit | 6de58d7ecbfd14beb7389c6ff56e764b5c00ba25 (patch) | |
| tree | 57b396b30644ac2fa3ec48fe38bc3efb419ce88d /src/server/authentication/Passport.ts | |
| parent | e17737982ea2ce84b4bded798ee7bdf730a75715 (diff) | |
changed acl- and some other field- to acl_ and field_ style
Diffstat (limited to 'src/server/authentication/Passport.ts')
| -rw-r--r-- | src/server/authentication/Passport.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/authentication/Passport.ts b/src/server/authentication/Passport.ts index a5222e531..ca9e3058e 100644 --- a/src/server/authentication/Passport.ts +++ b/src/server/authentication/Passport.ts @@ -18,11 +18,11 @@ passport.deserializeUser<any, any>((id, done) => { passport.use( new LocalStrategy({ usernameField: 'email', passReqToCallback: true }, (req, email, password, done) => { User.findOne({ email: email.toLowerCase() }) - .then((user: any) => { + .then((user: DashUserModel) => { if (!user) { done(undefined, false, { message: 'Invalid email or password' }); // invalid email } else { - (user as any as DashUserModel).comparePassword(password, (error: Error, isMatch: boolean) => { + user.comparePassword(password, (error: Error, isMatch: boolean) => { if (error) return done(error); if (!isMatch) return done(undefined, false, { message: 'Invalid email or password' }); // invalid password // valid authentication HERE |
