From e1004d6d26e7e8f123b40b3d5a6758d4840bc195 Mon Sep 17 00:00:00 2001 From: Mustafa Azyoksul <32205084+m-azyoksul@users.noreply.github.com> Date: Sun, 13 Mar 2022 07:26:33 +0300 Subject: [PATCH] Correctly set the token URL Previously, the token URL was always set to the base URL. Oidc service now uses the token URL from the environment file. This problem is likely caused by the fact that this project template wasn't sufficiently tested with different base and token URLs. --- QuickApp/ClientApp/src/app/services/oidc-helper.service.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/QuickApp/ClientApp/src/app/services/oidc-helper.service.ts b/QuickApp/ClientApp/src/app/services/oidc-helper.service.ts index 4d2c56df0..43507a32b 100644 --- a/QuickApp/ClientApp/src/app/services/oidc-helper.service.ts +++ b/QuickApp/ClientApp/src/app/services/oidc-helper.service.ts @@ -17,7 +17,6 @@ import { LoginResponse } from '../models/login-response.model'; @Injectable() export class OidcHelperService { - private get baseUrl() { return this.configurations.baseUrl; } private clientId = 'quickapp_spa'; private scope = 'openid email phone profile offline_access roles quickapp_api'; @@ -39,7 +38,7 @@ export class OidcHelperService { .append('grant_type', 'password') .append('scope', this.scope); - this.oauthService.issuer = this.baseUrl; + this.oauthService.issuer = this.configurations.tokenUrl; return from(this.oauthService.loadDiscoveryDocument()) .pipe(mergeMap(() => { @@ -54,7 +53,7 @@ export class OidcHelperService { .append('client_id', this.clientId) .append('grant_type', 'refresh_token'); - this.oauthService.issuer = this.baseUrl; + this.oauthService.issuer = this.configurations.tokenUrl; return from(this.oauthService.loadDiscoveryDocument()) .pipe(mergeMap(() => {