diff --git a/packages/hoppscotch-backend/src/auth/auth.module.ts b/packages/hoppscotch-backend/src/auth/auth.module.ts index 8585635e8..e00917616 100644 --- a/packages/hoppscotch-backend/src/auth/auth.module.ts +++ b/packages/hoppscotch-backend/src/auth/auth.module.ts @@ -11,7 +11,7 @@ import { RTJwtStrategy } from './strategies/rt-jwt.strategy'; import { GoogleStrategy } from './strategies/google.strategy'; import { GithubStrategy } from './strategies/github.strategy'; import { MicrosoftStrategy } from './strategies/microsoft.strategy'; -import { EmptyClassProvider, authProviderCheck } from './helper'; +import { authProviderCheck } from './helper'; @Module({ imports: [ @@ -27,9 +27,9 @@ import { EmptyClassProvider, authProviderCheck } from './helper'; AuthService, JwtStrategy, RTJwtStrategy, - authProviderCheck('GOOGLE') ? GoogleStrategy : EmptyClassProvider, - authProviderCheck('GITHUB') ? GithubStrategy : EmptyClassProvider, - authProviderCheck('MICROSOFT') ? MicrosoftStrategy : EmptyClassProvider, + ...(authProviderCheck('GOOGLE') ? [GoogleStrategy] : []), + ...(authProviderCheck('GITHUB') ? [GithubStrategy] : []), + ...(authProviderCheck('MICROSOFT') ? [MicrosoftStrategy] : []), ], controllers: [AuthController], }) diff --git a/packages/hoppscotch-backend/src/auth/helper.ts b/packages/hoppscotch-backend/src/auth/helper.ts index d083bc7a8..5b4c08839 100644 --- a/packages/hoppscotch-backend/src/auth/helper.ts +++ b/packages/hoppscotch-backend/src/auth/helper.ts @@ -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 *