hi Can you share a template project to reproduce? liming.ma@volosoft.com
hi @moinahmed
Your Business license can download the source code. https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project
hi
You can check this sample
https://community.abp.io/posts/how-to-override-localization-strings-of-depending-modules-ba1oy03l https://github.com/abpframework/abp-samples/tree/master/DocumentationSamples/ExtendLocalizationResource
hi
You seem to be using a microservice project.
Can you share the details of the deployment to azure?
hi
Also add below code to your ebank project
AddAuthentication(options =>
{
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = "oidc";
})
.AddCookie(options =>
{
options.ExpireTimeSpan = TimeSpan.FromMinutes(60);
options.Cookie.Name = "ebanking2";
})
.AddOpenIdConnect("oidc", options =>
{
options.Authority = "https://localhost:44359/";
options.RequireHttpsMetadata = true;
//options.SignedOutRedirectUri = "";
options.ClientId = "ebanking2";
//options.ClientSecret = "test";
options.Scope.Clear();
options.Scope.Add("openid");
options.Scope.Add("profile");
options.Scope.Add("email");
// options.Scope.Add("XSenseIdentity");
options.SaveTokens = true;
options.TokenValidationParameters = new TokenValidationParameters
{
NameClaimType = JwtClaimTypes.Name,
RoleClaimType = JwtClaimTypes.Role,
};
options.Events.OnRedirectToIdentityProvider = redirectContext =>
{
redirectContext.ProtocolMessage.Parameters.Add("__tenant", "test");
return Task.CompletedTask;
};
});
hi
AuthServer needs to resolve the current tenant.
invalid client id.
But the request doesn't contain tenant information, so it can't find the tenant's client
Try to add the below code to demoWebModule.cs
app.UseRouting();
app.Use(async (httpContext, next) =>
{
TenantConfiguration tenant = null;
try
{
tenant = await httpContext.RequestServices.GetRequiredService<ITenantConfigurationProvider>().GetAsync(saveResolveResult: true);
}
catch (Exception e)
{
await next(httpContext);
}
var tenantResolveResultAccessor = httpContext.RequestServices.GetRequiredService<ITenantResolveResultAccessor>();
if (tenantResolveResultAccessor.Result.AppliedResolvers.Contains(QueryStringTenantResolveContributor.ContributorName))
{
var currentTenant = httpContext.RequestServices.GetRequiredService<ICurrentTenant>();
if (tenant?.Id != currentTenant.Id)
{
using (currentTenant.Change(tenant?.Id, tenant?.Name))
{
await next(httpContext);
return;
}
}
}
await next(httpContext);
});
app.UseAuthentication();
app.UseAbpOpenIddictValidation();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
You should always call CheckErrors method for IdentityResult.
https://github.com/abpframework/abp/search?q=CheckErrors
hi
Please make your repository PRIVATE
https://github.com/maliming
What are the steps to reproduce?