the issue seems to be with _modules/@abp/ng.theme-shared
.
npm is expecting _modules/@abp/ng.theme-shared
but what is actually installed is _modules/@abp/ng.theme.shared
Thank you. I have resolved it by overriding the EmailConfirmationModel
I have replaced this ./Login
from
<a abp-button="Primary" href="@Url.Page("./Login", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["LoginToTheApplication"]</a>
by dynamically setting the full URL of the tenant.
The tenant names are not pre-determined. Users are expected to register as tenants with tenant names of their choosing. For this reason I wont be able to add the names to the RedirectAllowedUrls before they are created. We have configured wildcards to take care of this.
I will try override the EmailConfirmationModel as you suggested
Hi Maliming Can we rather get on a call. Zoom, Google meet or Teams
The value is null
even when I set it manually the button does not get the correct value.
This is the confirmation page link I get. You can see that the returnUrl value is added
https://st.localhost:44348/Account/EmailConfirmation?userId=97487596-3730-b62d-689f-3a1296a2b934&__tenant=00b2e43b-46db-745c-7db4-3a1296a2b6f4&confirmationToken=CfDJ8B5ozhcWAFlNj4ZmTrh5rF4R8AdTcFhmp%2F14OKgLb8uaxmPpDeJuLFpWT3O%2FhiupLSXepzJk2rM5EtDC%2F%2FNPKw5R56vahTyBuwSQCRAs7zEqnymCAb7DFIhrfhaScmdQED01%2B2ul5hrAMFcJnph%2FITgviLMvfS1qIuOtxOG8GeEFPe%2BIhBgIramiIalxk1pERNfqO5sTntRq5%2FeY3DeN77sZbfS4p6ic8McZQabSewA4br6Drlf2GudEQHyLrmXc1w%3D%3D&returnUrl=https://st.localhost
public async Task HandleEventAsync(TenantCreatedEto eventData) { using (CurrentTenant.Change(eventData.Id)) { var tenantEmail = eventData.Properties.GetOrDefault("AdminEmail"); var user = await UserManager.FindByEmailAsync(tenantEmail); var emailArgs = new SendEmailConfirmationTokenDto { AppName = "MVC", ReturnUrl = ReturnUrl, ReturnUrlHash = ReturnUrlHash, UserId = user.Id, }; await AccountAppService.SendEmailConfirmationTokenAsync(emailArgs); } }
This code works after upgrading to ABP 8. But I am faced with a new problem. after successfully confirming the email the "Login to application" button on the email confirmation page does not contain the correct return URL for the tenant. this is what I get
https://yahoo.localhost:44348/Account/Login?returnUrl=~%2F
I tried to manually set the redirect url but that did not work either
hi
Can you set a breakpoint to see which object is
null
?
**returnUrl ** and **returnUrlHash ** are coming in as null
Hi thanks for the help. The user not found issue is resolved now. But I get new errors. I have tried several options including AccountAppService.SendEmailConfirmationTokenAsync but to no avail. The HandleEventAsync is currently in my TenantRegister.cshtml.cs file.
Can you provide me with specifics on how to get this done. Possibly provide me with the complete code and where exactly to place it, in order for it to work.
I tried this option also
public async Task HandleEventAsync(TenantCreatedEto eventData)
{
using (CurrentTenant.Change(eventData.Id))
{
var tenantEmail = eventData.Properties.GetOrDefault("AdminEmail");
var user = await UserManager.FindByEmailAsync(tenantEmail);
var emailArgs = new SendEmailConfirmationTokenDto
{
AppName = "MVC",
ReturnUrl = ReturnUrl,
ReturnUrlHash = ReturnUrlHash,
UserId = user.Id,
};
await AccountAppService.SendEmailConfirmationTokenAsync(emailArgs);
}
}
but I get NullReferenceException: Object reference not set to an instance of an object.
I am developing a suite of 3 products, each consisting of 2 editions - a free plan and a paid/pro plan using ABP.io (Comercial - Team).
I have the following questions:
Will the same tenant be able to subscribe to different editions of the different products? In other words, to the free plan for one or two products and to the paid plan for others without having to create an edition for every permutation of Product-Edition combinations? In short, is it possible to have multiple editions per tenant (e.g. Product 1 Free, Product 2 Pro and Product 3, or Product 1 Pro, Product 2 Free and Product 3 Free), understanding that this could result in 3 "different" subscriptions/payment transactions in each payment period?
Will some users be able to subscribe to one edition (free plan) of a product while other users of the same tenant subscribe to the other edition (paid plan) of the same product? (i.e. Manage Edition at a User rather than a Tenant Level)
If your answer is negative on either question, will it be doable on the Business plan or is there another way to have multiple products in one codebase? (The one codebase is not as important, but we are after tenants to be able to log in to one "App" that has access to all three Products (if they so choose, or to just one product or any combination of 2 products, etc) as there is data sharing between the products (A tenant that has product 1, and now subscribes to product 2, Free or Pro, would have additional features made available that allows the tenant to link data across the products, both i.t.o reporting and functionality) and SSO - Single Sign On - across the suite of products is of paramount importance)
hi
the admin role can be removed for the admin user created during the tenant self registration.
Can you explain it in detail? And share some screenshots?
In the image, the role of admin can be removed by the user. Is it not the case that there must always be at least one admin for a tenant?
For the emailing confirmation issue, I tried doing this but got user does not exist error. Can you help with a detailed code on getting this to work please?
public async Task HandleEventAsync(TenantCreatedEto eventData)
{
var user = await UserManager.FindByEmailAsync(Input.EmailAddress);
var code = await UserManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code }, protocol: HttpContext.Request.Scheme);
await _emailSender.SendAsync(Input.EmailAddress, "Email confirmation",
$"Please confirm your email address by clicking the following link.<br> <a href='{callbackUrl}'>Confirm my email address</a>.");
}