1
0
mirror of https://github.com/bitwarden/server synced 2025-12-27 13:43:18 +00:00

validate and email on sso privisioning (#6734)

This commit is contained in:
Kyle Spearrin
2025-12-15 15:19:17 -05:00
committed by GitHub
parent 3c44430979
commit bead4f1d5a
2 changed files with 89 additions and 0 deletions

View File

@@ -99,6 +99,9 @@ public class RegisterUserCommand : IRegisterUserCommand
public async Task<IdentityResult> RegisterSSOAutoProvisionedUserAsync(User user, Organization organization)
{
// Validate that the email domain is not blocked by another organization's policy
await ValidateEmailDomainNotBlockedAsync(user.Email, organization.Id);
var result = await _userService.CreateUserAsync(user);
if (result == IdentityResult.Success)
{