@page "/login" @using BootStrapComponents @using Components @using Models.Identity @layout LayoutWithoutMenu
Forgot Password?
Or Login with
Don’t have an account? Register Now
@code { protected LoginModel LoginModel { get; set; } = new(); protected bool Loading { set; get; } protected async Task Submit() { Loading = true; StateHasChanged(); var response = await _userUtils.LoginWithPasswordRequest(LoginModel); Loading = false; if (response.IsSuccessStatusCode) { var result = await response.Content.ReadFromJsonAsync(); await LocalStorage.SetItemAsync(Statics.LoginTokenKey, result.AccessToken); NavManager.NavigateTo("/dashboard"); } } }