diff --git a/libs/oidc/src/services/oidc.service.spec.ts b/libs/oidc/src/services/oidc.service.spec.ts index 3d4aeb3..c48dfd6 100644 --- a/libs/oidc/src/services/oidc.service.spec.ts +++ b/libs/oidc/src/services/oidc.service.spec.ts @@ -13,7 +13,7 @@ import { SSRPagesService } from './ssr-pages.service'; import passport = require('passport'); describe('OidcService', () => { - let service/* = new OidcService(MOCK_OIDC_MODULE_OPTIONS, new ConfigService(), new SSRPagesService()) */; + let service; let options: OidcModuleOptions = MOCK_OIDC_MODULE_OPTIONS; const idpKey = 'idpKey'; diff --git a/libs/oidc/src/services/oidc.service.ts b/libs/oidc/src/services/oidc.service.ts index 0804b4c..578029f 100644 --- a/libs/oidc/src/services/oidc.service.ts +++ b/libs/oidc/src/services/oidc.service.ts @@ -42,7 +42,7 @@ export class OidcService implements OnModuleInit { this.isMultitenant = !!this.options.issuerOrigin; this.#instanceID = configService.get('SERVER_INSTANCE_ID'); this.#region = configService.get('REGION_NAME'); - this.#sessionKey = `oidc:${configService.get('APIM_BASE_URL').replace('https://', '')}`; + this.#sessionKey = configService.get('APIM_BASE_URL') ? `oidc:${configService.get('APIM_BASE_URL').replace('https://', '')}` : undefined; this.#oidc_redirect_uri = configService.get('OIDC_REDIRECT_URI') ? `${configService.get('OIDC_REDIRECT_URI')}` : `${this.options.origin}`; }