Esempio n. 1
0
        private async Task CompleteAuthentication(string code)
        {
            try
            {
                var auth = await _vidMeClient.ExchangeCodeForTokenAsync(code, Constants.ClientId, Constants.ClientSecret);

                if (auth != null)
                {
                    var user = await _vidMeClient.GetUserAsync(auth.User.UserId);

                    if (user != null && user.User != null)
                    {
                        auth.User = user.User;
                    }

                    AuthenticationService.Current.SetAuthenticationInfo(auth);
                }

                await LoadData(true);
            }
            catch (Exception ex)
            {
            }
        }