Restructuring the folders
This commit is contained in:
9
src/passport/strategies/local.ts
Normal file
9
src/passport/strategies/local.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// eslint-disable-next-line import/named
|
||||
import { Strategy as LocalStrategy } from 'passport-local';
|
||||
|
||||
import { authenticate } from '@mifi/auth-db/lib/api/authenticate';
|
||||
|
||||
export default new LocalStrategy(async (username, password, done) => {
|
||||
const user = await authenticate(username, password);
|
||||
done(null, user);
|
||||
});
|
||||
Reference in New Issue
Block a user