public async Task MarkAsAuthentificated(string username, UserManager <User> context) { await _sessionStorage.SetItemAsync("name", username); this.username = username; this.context = context; if (!IsAuthorized.ContainsKey(username)) { IsAuthorized.Add(username, true); } else { IsAuthorized[username] = true; } base.NotifyAuthenticationStateChanged(GetAuthenticationStateAsync()); }
public async Task SetSettings(Settings settings) { await _sessionStorage.SetItemAsync("Settings", settings); }