10 lines
345 B
TypeScript
10 lines
345 B
TypeScript
// 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: string, password: string, done: any) => {
|
|
const user = await authenticate(username, password);
|
|
done(null, user);
|
|
});
|