public void LogOut() { var acct = SecureStorageStore.FindAccountsForServiceAsync(Configuration.GoogleServiceName)?.Result?.FirstOrDefault(); SecureStorageStore.SaveAsync(null, Configuration.GoogleServiceName).Wait(); _loggedIn = null; OnLoggedOut?.Invoke(this, new EventArgs()); }
public AccountModel GetLoggedInAccount() { if (_loggedIn != null) { return(_loggedIn); } var token = SecureStorageStore.FindAccountsForServiceAsync(Configuration.GoogleServiceName)?.Result?.FirstOrDefault(); var model = GetModelFromAccount(token); _loggedIn = model; return(model); }