diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/WellKnown/OauthAuthorizationServer/Queries/Get/GetOauthAuthorizationServerQuery.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/WellKnown/OauthAuthorizationServer/Queries/Get/GetOauthAuthorizationServerQuery.cs index d392df775..e8ee08a6e 100644 --- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/WellKnown/OauthAuthorizationServer/Queries/Get/GetOauthAuthorizationServerQuery.cs +++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/WellKnown/OauthAuthorizationServer/Queries/Get/GetOauthAuthorizationServerQuery.cs @@ -17,10 +17,11 @@ public GetOauthAuthorizationServerQueryHandler( public async Task Handle(GetOauthAuthorizationServerQuery request, CancellationToken cancellationToken) { + var issuerUrl = _applicationSettings.Dialogporten.BaseUri.AbsoluteUri.TrimEnd('/') + "/api/v1"; return await Task.FromResult(new GetOauthAuthorizationServerDto { - Issuer = _applicationSettings.Dialogporten.BaseUri + "api/v1", - JwksUri = _applicationSettings.Dialogporten.BaseUri + "api/v1/.well-known/jwks.json" + Issuer = issuerUrl, + JwksUri = $"{issuerUrl}/.well-known/jwks.json" }); } }