feat: remove EmptyClassProvider class
This commit is contained in:
@@ -11,7 +11,7 @@ import { RTJwtStrategy } from './strategies/rt-jwt.strategy';
|
|||||||
import { GoogleStrategy } from './strategies/google.strategy';
|
import { GoogleStrategy } from './strategies/google.strategy';
|
||||||
import { GithubStrategy } from './strategies/github.strategy';
|
import { GithubStrategy } from './strategies/github.strategy';
|
||||||
import { MicrosoftStrategy } from './strategies/microsoft.strategy';
|
import { MicrosoftStrategy } from './strategies/microsoft.strategy';
|
||||||
import { EmptyClassProvider, authProviderCheck } from './helper';
|
import { authProviderCheck } from './helper';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -27,9 +27,9 @@ import { EmptyClassProvider, authProviderCheck } from './helper';
|
|||||||
AuthService,
|
AuthService,
|
||||||
JwtStrategy,
|
JwtStrategy,
|
||||||
RTJwtStrategy,
|
RTJwtStrategy,
|
||||||
authProviderCheck('GOOGLE') ? GoogleStrategy : EmptyClassProvider,
|
...(authProviderCheck('GOOGLE') ? [GoogleStrategy] : []),
|
||||||
authProviderCheck('GITHUB') ? GithubStrategy : EmptyClassProvider,
|
...(authProviderCheck('GITHUB') ? [GithubStrategy] : []),
|
||||||
authProviderCheck('MICROSOFT') ? MicrosoftStrategy : EmptyClassProvider,
|
...(authProviderCheck('MICROSOFT') ? [MicrosoftStrategy] : []),
|
||||||
],
|
],
|
||||||
controllers: [AuthController],
|
controllers: [AuthController],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -98,8 +98,6 @@ export const subscriptionContextCookieParser = (rawCookies: string) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export class EmptyClassProvider {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check to see if given auth provider is present in the ALLOWED_AUTH_PROVIDERS env variable
|
* Check to see if given auth provider is present in the ALLOWED_AUTH_PROVIDERS env variable
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user