limited_dev
e8e97b2cd9
!fix: The user auth system now uses the id, not the email Signed-off-by: limited_dev <loginakkisativ@gmail.com>
34 lines
792 B
Text
34 lines
792 B
Text
@using ImageBoardServerApp.Auth
|
|
@inherits LayoutComponentBase
|
|
@inject AuthenticationStateProvider authStateProvider
|
|
@inject NavigationManager navManager
|
|
|
|
<PageTitle>BulletBoard</PageTitle>
|
|
|
|
<div class="page">
|
|
<div class="sidebar">
|
|
<NavMenu/>
|
|
</div>
|
|
|
|
<main>
|
|
<article class="content px-4">
|
|
@Body
|
|
</article>
|
|
</main>
|
|
</div>
|
|
|
|
@code
|
|
{
|
|
|
|
private string mail { get; set; } = "";
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
var cauthStateProvder = (CustomAuthenticationStateProvider)authStateProvider;
|
|
var user = await cauthStateProvder.GetAuthenticationStateAsync();
|
|
if (user.User.Identity.IsAuthenticated)
|
|
{
|
|
mail = $"Welcome User # {user.User.Identity.Name}";
|
|
}
|
|
}
|
|
}
|