Activities of "franciscokadzi@gmail.com"

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.

hi

  1. 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>.");

}

Yes I have seen this issue ealier. It assumes the UI is MVC. My UI is angular. Do you mean to say I have to create a new menucontributor in my HttpApi.Host project? Secondly in my case I do not seek to use permissions to hide or show the menus. I just want to hide it by default.

Thanks for the response.

How about Linked Accounts, authenticator app and Authority delegation

Showing 1 to 10 of 12 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11