Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.2k views
in Technique[技术] by (71.8m points)

c# - How to override LoginDisplay in Blazor Identity Server 4 in ASP.NET Core WebAssembly .NET 5?

Maybe have some question related to override existing authentication/authorization in ASP.NET Core 3 . My question is in another specific context (not duplicated question).

I am using ASP.NET Core Blazor WebAssembly on .NET 5 (version 5.0.102), Microsoft Visual Studio Community 2019 Version 16.8.4 (lastest technology stack at the current time). I create project from template of Blazor WebAssembly template .NET 5 with individual account from Identity Server 4.

This is file MainLayout.razor

enter image description here

@inherits LayoutComponentBase

@inject NavigationManager NavigationManager

<div class="page">
    @*
        <div class="sidebar">
            <NavMenu />
        </div>*@

    <div class="main">
        <div class="px-4 auth">
            <!-- <div class="top-row px-4 auth" />-->
            <!-- Thêm menu vào ?ay -->

            <DxMenu></DxMenu>

            <div class="top-row">
                <LoginDisplay />
            </div>
        </div>

        <div class="content px-4">
            @Body
        </div>
    </div>
</div>

@code{
    void GotoHome()
    {
        NavigationManager.NavigateTo("/");
    }
}

When I integrated with other UI framework, CSS of Identity Server 4 is conflict, cause defect at UI. I need override/rewrite UI razor page(s) (<LoginDisplay />) of Identity Server 4, how to do it?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...