Skip to content

Commit

Permalink
restore redirect_uri setup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianW committed Oct 4, 2024
1 parent 3f01c98 commit dd8f6b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/oidc/src/services/oidc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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() {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit dd8f6b5

Please sign in to comment.