Open Closed

Where is the source code of account/login? in Blazor (server side) application? #2668


User avatar
0
zhongfang created
  • ABP Framework version: v5.1.3
  • UI type: Blazor (Server Side)
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

I want to add some fuction while Redirect to login.

Volo.Abp.AspNetCore.Components.Web.LeptonTheme/Components/RedirectToLogin.razor

@inject NavigationManager Navigation
@inject IJSRuntime JSRuntime

@code { 
    protected override void OnInitialized()
    {
        bool isWebAssembly = JSRuntime is IJSInProcessRuntime;
        if (isWebAssembly)
        {
            Navigation.NavigateTo($"authentication/login?returnUrl={Uri.EscapeDataString(Navigation.Uri)}");
        }
        else
        {
            Navigation.NavigateTo($"account/login?returnUrl={Uri.EscapeDataString(Navigation.Uri)}", true);
        }
    } 
}

My question is where is the source code of "account/login"?


4 Answer(s)
  • User Avatar
    0
    zhongfang created

    I deploy same blazor application (server side). and run with many domain name. such as a.com, b.net, c.org. So I want to redirecto to different Identity Server 4 site according to there domain name. So I want to change the logic of above RedirectToLogin.

    In common, we write solid configuration in appsettings.json as below

      "AuthServer": {
        "Authority": "https://id.a.com",
        "RequireHttpsMetadata": "false",
        "ClientId": "Tired_Blazor2022",
        "ClientSecret": "1q2w3e*"
      },
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    account/login

    this belongs to the Account pro module.

  • User Avatar
    0
    zhongfang created

    I have the source code of Account Pro module. But I have nont found the source code.

    But, which project? which folder?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    abp\account\src\Volo.Abp.Account.Pro.Public.Web\Pages\Account\Login.cshtml.cs

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38