Merge pull request #4673 from sbwalker/dev
fix remote login issue which could occut if multiple users have the same email address
This commit is contained in:
commit
facd3c8956
@ -592,7 +592,7 @@ namespace Oqtane.Extensions
|
||||
}
|
||||
|
||||
// create claims identity
|
||||
identityuser = await _identityUserManager.FindByEmailAsync(user.Username);
|
||||
identityuser = await _identityUserManager.FindByNameAsync(user.Username);
|
||||
user.SecurityStamp = identityuser.SecurityStamp;
|
||||
identity = UserSecurity.CreateClaimsIdentity(alias, user, userRoles);
|
||||
identity.Label = ExternalLoginStatus.Success;
|
||||
@ -645,7 +645,7 @@ namespace Oqtane.Extensions
|
||||
}
|
||||
}
|
||||
|
||||
_logger.Log(LogLevel.Information, "ExternalLogin", Enums.LogFunction.Security, "External User Login Successful For {Username} From IP Address {IPAddress} Using Provider {Provider}", user.Username, httpContext.Connection.RemoteIpAddress, providerName);
|
||||
_logger.Log(LogLevel.Information, "ExternalLogin", Enums.LogFunction.Security, "External User Login Successful For {Username} From IP Address {IPAddress} Using Provider {Provider}", user.Username, httpContext.Connection.RemoteIpAddress.ToString(), providerName);
|
||||
}
|
||||
}
|
||||
else // claims invalid
|
||||
|
Reference in New Issue
Block a user