mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-22 20:51:29 +10:00
🚀 release v3.0.0
This commit is contained in:
@ -1,18 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user