Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix: read data from DB for latest value (#4623)

Mir Arif Hasan8aa816c38e6f
diff --git a/packages/hoppscotch-backend/src/infra-config/infra-config.service.ts b/packages/hoppscotch-backend/src/infra-config/infra-config.service.ts
index d0749f539..2c95df8a3 100644
--- a/packages/hoppscotch-backend/src/infra-config/infra-config.service.ts
+++ b/packages/hoppscotch-backend/src/infra-config/infra-config.service.ts
@@ -371,10 +371,10 @@ export class InfraConfigService implements OnModuleInit {
* @returns Either true or an error
*/
async enableAndDisableSSO(providerInfo: EnableAndDisableSSOArgs[]) {
- const allowedAuthProviders = this.configService
- .get<string>('INFRA.VITE_ALLOWED_AUTH_PROVIDERS')
- .split(',');
+ const infra = await this.get(InfraConfigEnum.VITE_ALLOWED_AUTH_PROVIDERS);
+ if (E.isLeft(infra)) return E.left(infra.left);
+ const allowedAuthProviders = infra.right.value.split(',');
let updatedAuthProviders = allowedAuthProviders;
const infraConfigMap = await this.getInfraConfigsMap();