public async void Init() { IsLoggedIn = false; var username = _localSettings.ReadString("Username"); if (username != null) { // get password var jwt = SettingsStorageExtensions.GetCredentialFromLocker(username); if (jwt != null && !string.IsNullOrEmpty(jwt.Password)) { // set jwt _client.SetJWToken(jwt.Password); IsLoggedIn = await _client.IsValidJWToken(); if (IsLoggedIn) { CurrentUser = await _client.Users.GetCurrentUser(); } } } }