This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import passport from 'koa-passport';
|
||||
// eslint-disable-next-line import/named
|
||||
import { Strategy as LocalStrategy } from 'passport-local';
|
||||
|
||||
import Auth from '../model/auth';
|
||||
|
||||
export const localStrategy = passport.use(
|
||||
new LocalStrategy(async (username, password, done) => {
|
||||
new LocalStrategy(async (username: string, password: string, done: any) => {
|
||||
const user = await Auth.findOne({
|
||||
where: {
|
||||
username,
|
||||
|
||||
Reference in New Issue
Block a user