🚀 release: v3.0.0

This commit is contained in:
Amruth Pillai
2022-03-02 17:44:11 +01:00
parent 2175256310
commit 295172687b
352 changed files with 30932 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import { Injectable } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport';
import { Strategy } from 'passport-local';
import { User } from '@/users/entities/user.entity';
import { AuthService } from '../auth.service';
@Injectable()
export class LocalStrategy extends PassportStrategy(Strategy) {
constructor(private authService: AuthService) {
super({ usernameField: 'identifier' });
}
async validate(identifier: string, password: string): Promise<User> {
return this.authService.getUser(identifier, password);
}
}