IdentityServer / IdentityServer3.AspNetIdentity

ASP.NET Identity support for Thinktecture IdentityServer3
Apache License 2.0
64 stars 51 forks source link

External account - not active user able to login #70

Closed pawepaw closed 8 years ago

pawepaw commented 8 years ago

I've spotted that external accounts are able to login to system even if they are locked.

i fixed it by overriding ProcessExistingExternalAccountAsync method and checking if user is locked out.

        protected override async Task<AuthenticateResult> ProcessExistingExternalAccountAsync(int userID, string provider, string providerId, IEnumerable<Claim> claims)
        {
            if (userManager.IsLockedOut(userID))
            {
                return new AuthenticateResult(Messages.InvalidUserNameOrPassword);
            }
            return await base.ProcessExistingExternalAccountAsync(userID, provider, providerId, claims);
        }

if you want i can create pull request for checking if user is active.

brockallen commented 8 years ago

Sure, PR away.