commit
ed2000336d
|
|
@ -96,6 +96,7 @@ public class UserService : IUserService
|
|||
}
|
||||
|
||||
User? user = record;
|
||||
var isAuthenticatedByHook = false;
|
||||
var hooks = _services.GetServices<IAuthenticationHook>();
|
||||
if (record == null || record.Source != "internal")
|
||||
{
|
||||
|
|
@ -129,6 +130,8 @@ public class UserService : IUserService
|
|||
};
|
||||
await CreateUser(record);
|
||||
}
|
||||
|
||||
isAuthenticatedByHook = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -138,13 +141,13 @@ public class UserService : IUserService
|
|||
return default;
|
||||
}
|
||||
|
||||
if (_setting.NewUserVerification && !record.Verified)
|
||||
if (!isAuthenticatedByHook && _setting.NewUserVerification && !record.Verified)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
#if !DEBUG
|
||||
if (Utilities.HashText(password, record.Salt) != record.Password)
|
||||
if (!isAuthenticatedByHook && Utilities.HashText(password, record.Salt) != record.Password)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue