feat: add refresh token and global exception filter
This commit is contained in:
@@ -12,12 +12,16 @@ import { VerifyOTPProvider } from './providers/verify-otp.provider';
|
||||
import { JwtStrategy } from './strategies/jwt.strategy';
|
||||
import { APP_GUARD } from '@nestjs/core';
|
||||
import { GlobalAuthGuard } from './guards/global-auth.guard';
|
||||
import { RefreshTokensProvider } from './providers/refresh-tokens.provider';
|
||||
import { RedisModule } from '@/common/modules/redis/redis.module';
|
||||
import { AuthRedisProvider } from './providers/auth-redis.provider';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
UsersModule,
|
||||
OtpModule,
|
||||
HashingModule,
|
||||
RedisModule,
|
||||
JwtModule.registerAsync({
|
||||
inject: [ConfigService],
|
||||
useFactory: (configService: ConfigService) => ({
|
||||
@@ -37,6 +41,8 @@ import { GlobalAuthGuard } from './guards/global-auth.guard';
|
||||
LoginProvider,
|
||||
VerifyOTPProvider,
|
||||
JwtStrategy,
|
||||
RefreshTokensProvider,
|
||||
AuthRedisProvider,
|
||||
{
|
||||
provide: APP_GUARD,
|
||||
useClass: GlobalAuthGuard,
|
||||
|
||||
Reference in New Issue
Block a user