Hi,
You can check the document:
redirect_uri is not valid for client application
You should check the client application's redirect_uri.
You can edit the application through OpenId UI
Hi,
Because the product service needs to load user information from the identity service and the package was added to ProductService.HttpAPI.Host not the Blazor app.
Hi,
Steps:
"RemoteServices": {
"AbpIdentity": {
"BaseUrl": "https://localhost:44388/",
"UseCurrentAccessToken": "false"
}
},
"IdentityClients": {
"Default": {
"GrantType": "client_credentials",
"ClientId": "AdministrationService",
"ClientSecret": "1q2w3e*",
"Authority": "https://localhost:44322",
"Scope": "IdentityService",
"RequireHttps": "true",
"ValidateIssuerName": "true",
"ValidateEndpoints ": "true"
}
},
You can create an application named
ProductServiceinstead of usingAdministrationService
<PackageReference Include="Volo.Abp.Identity.Pro.HttpApi.Client" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="7.2.2" />
[DependsOn(typeof(AbpHttpClientIdentityModelWebModule))]
[DependsOn(typeof(AbpIdentityHttpApiClientModule))]
public class ProductServiceHttpApiHostModule : AbpModule
ProductServiceHttpApiHostModulepublic override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.Use(async (httpContext, next) =>
{
var accessToken = httpContext.Request.Query["access_token"];
var path = httpContext.Request.Path;
if (!string.IsNullOrEmpty(accessToken) &&
(path.StartsWithSegments("/signalr-hubs/chat")))
{
httpContext.Request.Headers["Authorization"] = "Bearer " + accessToken;
}
await next();
});
........
}