Could you please provide an example and where should I put that file?
I created a class and implemented the IsRedirectAllowedUrl, but I needed to implement other methods too and now it fails when calling the other methods because they don't have a real implementation, I'm just returning a default value. Is there a way to just implement the IsRedirectAllowedUrl method?
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.UI.Navigation.Urls;
namespace CompuCare.Providers;
public class CustomAppUrlProvider : IAppUrlProvider, ITransientDependency
{
public bool IsRedirectAllowedUrl(string url)
{
return true;
}
public async Task<string> GetUrlAsync(string appName, string urlName)
{
return default;
}
public async Task<string> GetUrlOrNullAsync(string appName, string urlName)
{
return default;
}
public async Task<string> NormalizeUrlAsync(string url)
{
return default;
}
}
It's not working, still getting the same :
2023-12-15 07:07:42.296 +00:00 [ERR] Invalid RedirectUrl: https://tenanta.ccalp.dev/account/login, Use AppUrlProvider to configure it!
"App": { "SelfUrl": "https://{{tenantName}}.api.ccalp.dev", "AngularUrl": "https://{{tenantName}}.ccalp.dev", "CorsOrigins": "https://*.ccalp.dev,https://ccalp.dev,https://app-compucare-api-dev.azurewebsites.net", "RedirectAllowedUrls": "https://*.ccalp.dev,https://ccalp.dev,https://app-compucare-api--ev.azurewebsites.net,https://{{tenantName}}.ccalp.dev/", "HealthCheckUrl": "https://api.ccalp.dev/health-status" },
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.Applications["Angular"].RootUrl = configuration["App:AngularUrl"];
options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
options.Applications["Angular"].Urls[AccountUrlNames.EmailConfirmation] = "account/email-confirmation";
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"].Split(','));
});
}
This is what I have in my appsettings, should I add that one too?
"App": { "SelfUrl": "https://{{tenantName}}.api.ccalp.net", "AngularUrl": "https://{{tenantName}}.ccalp.net", "CorsOrigins": "https://.ccalp.net,https://ccalp.net,https://app-compucare-api.azurewebsites.net", "RedirectAllowedUrls": "https://*.ccalp.net,https://ccalp.net,https://app-compucare-api.azurewebsites.net", "DisablePII": "false", "HealthCheckUrl": "https://api.ccalp.net/health-status" },
Let me know if you need the entire log file and how to upload it
This is the link that gets sent on the email:
https://stoneledge.api.ccalp.net/Account/EmailConfirmation?userId=aaffb906-e621-3bf8-447a-3a0f73e8c224&__tenant=4946f7b1-d359-9962-e04d-3a0f73e8bc31&confirmationToken=CfDJ8BIvM4qjvL5NnmgtuRCj4m54s4w6tNaBHa7BpL0v03G3p8kB23aiCfyT0QLZjaemy9vxTbnr5U%2F8NW4cKFZn27ot0yXZInBqIZPSySiUrbNElYO0zazR889SQ6%2FFCk1bbSH8sbvWHk1D3C9jAKIdYMbdzLqJS%2FNKgAXQ2aUm1QqdVQ90f3YhDCuet4koM1ehDi3kgSiFq6jVpY0TE2cC70YMlgNK%2B9bW%2BJStwkwgtQwFBNu2qfe%2FPzyuJQNZUES1cg%3D%3D&returnUrl=https://stoneledge.ccalp.net/account/login
I found the following in the logs:
2023-12-15 04:14:47.273 +00:00 [INF] Executed endpoint 'Health checks' 2023-12-15 04:14:47.273 +00:00 [INF] The response could not be cached for this request. 2023-12-15 04:14:47.273 +00:00 [INF] Request finished HTTP/1.1 GET http://api.ccalp.net/health-status - - - 200 - application/json 9.9547ms 2023-12-15 04:14:47.277 +00:00 [INF] Received HTTP response headers after 18.9885ms - 200 2023-12-15 04:14:47.277 +00:00 [INF] End processing HTTP request after 19.1311ms - 200 2023-12-15 04:14:47.278 +00:00 [INF] Saved 2 entities to in-memory store. 2023-12-15 04:14:55.899 +00:00 [INF] Request starting HTTP/1.1 GET http://stoneledge.api.ccalp.net/Account/EmailConfirmation?userId=aaffb906-e621-3bf8-447a-3a0f73e8c224&__tenant=4946f7b1-d359-9962-e04d-3a0f73e8bc31&confirmationToken=CfDJ8BIvM4qjvL5NnmgtuRCj4m54s4w6tNaBHa7BpL0v03G3p8kB23aiCfyT0QLZjaemy9vxTbnr5U%2F8NW4cKFZn27ot0yXZInBqIZPSySiUrbNElYO0zazR889SQ6%2FFCk1bbSH8sbvWHk1D3C9jAKIdYMbdzLqJS%2FNKgAXQ2aUm1QqdVQ90f3YhDCuet4koM1ehDi3kgSiFq6jVpY0TE2cC70YMlgNK%2B9bW%2BJStwkwgtQwFBNu2qfe%2FPzyuJQNZUES1cg%3D%3D&returnUrl=https://stoneledge.ccalp.net/account/login - - 2023-12-15 04:14:55.899 +00:00 [INF] No cached response available for this request. 2023-12-15 04:14:55.905 +00:00 [INF] Executing endpoint '/Account/EmailConfirmation' 2023-12-15 04:14:55.916 +00:00 [INF] Route matched with {page = "/Account/EmailConfirmation", action = "", controller = "", area = ""}. Executing page /Account/EmailConfirmation 2023-12-15 04:14:55.916 +00:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2023-12-15 04:14:55.975 +00:00 [INF] Executing handler method Volo.Abp.Account.Public.Web.Pages.Account.EmailConfirmationModel.OnGetAsync - ModelState is "Valid" 2023-12-15 04:14:55.979 +00:00 [ERR] Invalid RedirectUrl: https://stoneledge.ccalp.net/account/login, Use AppUrlProvider to configure it!
I upgraded to 7.4.4 and still have the issue
FYI: If I do it from the host it works, it only happens from a tenant
domain.com --> OK tenant.domain.com ---> Not OK
After verifying a user e mail the login link is taking me to the swagger page instead of the login page, how do I fix that?
I think I figured it out, I needed to remove the validation attributes. Could you please refund my question usage.
Thanks.
ABP Framework version: v7.4.0
Hello, I have extended the "IdentityUser" and added some properties to it, I don't want those properties to show up in the UI, but I want to use the built-in API to get, create, and update the entity. I used "MapEfCoreProperty" to create columns in the table. I have built custom forms in the UI (angular) to view, create, and update the entity. Now, when I go to "My Account" and try to update my info I get a validation error that says that some of the properties are required, why is that?