From dd8f6b5fe6efe1621848bcc55d794d6d09428370 Mon Sep 17 00:00:00 2001 From: SebastianW Date: Fri, 4 Oct 2024 12:59:59 +0200 Subject: [PATCH] restore redirect_uri setup logic --- libs/oidc/src/services/oidc.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/oidc/src/services/oidc.service.ts b/libs/oidc/src/services/oidc.service.ts index 2e34fcd..c2d7d62 100644 --- a/libs/oidc/src/services/oidc.service.ts +++ b/libs/oidc/src/services/oidc.service.ts @@ -15,13 +15,13 @@ import { SSRPagesService } from './ssr-pages.service'; import passport = require('passport'); // const url = require('url'); -// const _loginCallbackPath = 'login/callback'; +const _loginCallbackPath = 'login/callback'; @Injectable() export class OidcService implements OnModuleInit { readonly logger = new Logger(OidcService.name); #region: string; - // #redirect_uri: string; + #redirect_uri: string; isMultitenant: boolean = false; strategy: any; #instanceID: string; @@ -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.#redirect_uri = configService.get('OIDC_REDIRECT_URI') ? `${configService.get('OIDC_REDIRECT_URI')}/${_loginCallbackPath}` : `${this.options.origin}/${_loginCallbackPath}`; + this.#redirect_uri = configService.get('OIDC_REDIRECT_URI') ? `${configService.get('OIDC_REDIRECT_URI')}/${_loginCallbackPath}` : `${this.options.origin}/${_loginCallbackPath}`; } async onModuleInit() { @@ -85,7 +85,7 @@ export class OidcService implements OnModuleInit { tokenStore, strategy, }; - // this.options.authParams.redirect_uri = this.#redirect_uri; + this.options.authParams.redirect_uri = this.#redirect_uri; this.options.authParams.nonce = this.options.authParams.nonce === 'true' ? uuid() : this.options.authParams.nonce; strategy = new OidcStrategy(this, key, channelType);