예제 #1
0
        public void LogOut()
        {
            var acct = SecureStorageStore.FindAccountsForServiceAsync(Configuration.GoogleServiceName)?.Result?.FirstOrDefault();

            SecureStorageStore.SaveAsync(null, Configuration.GoogleServiceName).Wait();
            _loggedIn = null;
            OnLoggedOut?.Invoke(this, new EventArgs());
        }
예제 #2
0
        public AccountModel GetLoggedInAccount()
        {
            if (_loggedIn != null)
            {
                return(_loggedIn);
            }

            var token = SecureStorageStore.FindAccountsForServiceAsync(Configuration.GoogleServiceName)?.Result?.FirstOrDefault();
            var model = GetModelFromAccount(token);

            _loggedIn = model;
            return(model);
        }