@page "/Login" @using MatrixRoomUtils.Core @using MatrixRoomUtils.Core.Authentication @inject ILocalStorageService LocalStorage

Login






@code { string homeserver = ""; string username = ""; string password = ""; async Task Login() { var result = await MatrixAuth.Login(homeserver, username, password); Console.WriteLine($"Obtained access token for {result.UserId}!"); RuntimeCache.LastUsedToken = result.AccessToken; var userinfo = new UserInfo() { LoginResponse = result, Profile = await (await new RemoteHomeServer(result.HomeServer).Configure()).GetProfile(result.UserId) }; RuntimeCache.LoginSessions.Add(userinfo.AccessToken, userinfo); await LocalStorageWrapper.SaveToLocalStorage(LocalStorage); } }