this is happening every time during the initial registration. Lets say, you have USER100, it will say USER100 is duplicate because the migration are running twice.
Okay, I got it. I think you should remove your migration code here. ABP will automatically migrate data.
MigrateAndSeedTenantDatabaseAsync
and AssignPermissionsToAdminRoleAsync
DataSeedContributor
to assign roles&permissions for usershttps://abp.io/docs/latest/framework/infrastructure/data-seeding
Hi,
Is there any error message?
Hi,
The image just an example, should be .Blazor
project for your case
Hi,
I'm using app-pro template, so probably the code that you provided won't work to hide the tenant field on login page?
It can hide the tenant field; you can give it a try.
As I previously mentioned I'm using code below to correctly redirect user from portal to the auth server. PortalBlazorModule.cs
It works only when you are already on the login page and you modify the URL but when you are redirected from the portal page then it doesn't work for host (empty tenant).
You can try this
app.Use(async (httpContext, next) =>
{
if (httpContext.Request.Path.StartsWithSegments("/Account/Login"))
{
var returnUrl = httpContext.Request.Query["ReturnUrl"].ToString();
if(returnUrl.Contains("__tenant"))
{
var tenant = returnUrl.Split("__tenant=")[1].Split("&")[0];
var queryBuilder = new QueryBuilder();
foreach (var key in httpContext.Request.Query.Keys)
{
queryBuilder.Add(key, httpContext.Request.Query[key].ToString());
}
queryBuilder.Add("__tenant", tenant);
httpContext.Request.QueryString = queryBuilder.ToQueryString();
}
}
await next();
});
about the authority, I want to bind it when I call service to get data from database then binding it.
First, the Options'authority URL must be reachable, don't use placeholder. Then you can change it in the event.
I don't know why I cannot show the custom field on openiddictapplication. I already followed the guide and I still not able to display the custom field on UI.
Could you share a test project with me? i will check it. shiwei.liang@volosoft.com
dotnet dev-certs https -v -ep openiddict.pfx -p a0166a3a-5ffb-4f53-a8d7-a699d3c3ce1e
Hi,
Please create a new question, thanks.
I don't know what is different between openiddictapplication and the others. Because I already done to add more custom field on saastenant but I am not able to add more field and display it on UI on admin to process it. And I see in the saastenant we have saastenantCreateDTO and saastenantUpdateDTO but openIddictApplication doesn't have it. Please let me know how can I implement it for openIdidictApplication.
you should add custom fields on openIdidictApplication
ObjectExtensionManager.Instance.Modules()
.ConfigureOpenIddict(openid =>
{
openid.ConfigureApplication(...)
}