コード例 #1
0
        public async Task StartResetPasswordFlow(StartResetPasswordFlowDto startResetPasswordFlowDto)
        {
            var user = await _userManager.GetByAsync(x => x.Email == startResetPasswordFlowDto.Email);

            if (user == null)
            {
                return;
            }

            var hash = RandomHashGenerator.RandomHash;

            if (user.HasLocalAccount())
            {
                await SaveUserResetPasswordData(user, hash);
            }
            _emailService.SendResetPasswordEmail(user.Email, user.HasLocalAccount(), hash);
        }
コード例 #2
0
        public async Task <IActionResult> StartResetPasswordFlow([FromBody] StartResetPasswordFlowDto startResetPasswordFlowDto)
        {
            await _passwordResetService.StartResetPasswordFlow(startResetPasswordFlowDto);

            return(NoContent());
        }