refactor( iam ): remove local auth service delegate OTP and password reset to IAM

This commit is contained in:
Abubeker Yasin
2026-06-06 10:23:53 +03:00
parent 023522c3fb
commit 254d2a171c
5 changed files with 40 additions and 141 deletions

View File

@@ -1,17 +0,0 @@
import { Injectable } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport';
import { ExtractJwt, Strategy } from 'passport-jwt';
import { ConfigService } from '@nestjs/config';
@Injectable()
export class JwtStrategy extends PassportStrategy(Strategy) {
constructor(config: ConfigService) {
super({
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
secretOrKey: config.get('JWT_SECRET'),
});
}
async validate(payload: any) {
return { userId: payload.sub, email: payload.email, role: payload.role, passengerId: payload.passengerId };
}
}