Exemplo n.º 1
0
 /// <summary>
 /// Clears the cache
 /// </summary>
 /// <param name="app"></param>
 private void ClearCache(IPublicClientApplication app)
 {
     foreach (IUser user in app.Users.ToArray())
     {
         app.Remove(user);
     }
 }
Exemplo n.º 2
0
        public async Task <bool> RequestLoginAsync()
        {
            foreach (var user in _pca.Users)
            {
                _pca.Remove(user);
            }
            //ms-app://s-1-15-2-3388634293-103715313-3266902762-3262461205-4164087508-4155876753-1602774140/
            var userByPolicy = GetUserByPolicy(_pca.Users, _policySignUpSignIn);
            await _pca.AcquireTokenAsync(_scopes, userByPolicy, _uiParent);

            //TODO if we reach here, is there a chance login was not successful?
            return(true);
        }