In Browser console i could see following error: Status 403 Forbidden VersionHTTP/2 Transferred8.81 KB (8.33 KB size)
we are surely not supporting HTTP/2. I am not sure how HTTP/2 protocol getting used
yes as part of "IdentityServerModule" --> ConfigureServices() method
hi Maliming, Thanks for help. Now i am receiving email but i have to do few more changes in my CreateUser Method:
public override async Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input) { IdentityUserDto identityUserDto = await base.CreateAsync(input);
var user = await _identityUserRepository.FindByNormalizedEmailAsync(input.Email.ToUpperInvariant());
var confirmationToken = await UserManager.GenerateEmailConfirmationTokenAsync(user);
await _AccountEmailer.SendEmailConfirmationLinkAsync(user, confirmationToken, "MVC", "https://localhost:4200");
return identityUserDto;
}
Now i have 2 challenges:
1- i am not getting full url but getting like this which is missing the domain: /Account/EmailConfirmation?userId=e3eecf67-85fc-59eb-face-3a00cf032a62&tenantId=&confirmationToken=CfDJ8M3speqUcVZAto9TzzaT5%2BngwUFUIw%2Fta3OQuB7gt8dBiWPePpBsnP6Sh9i72U7wAUau1Ogb8dHEBXcXsWQkc4QjzR4hQvMno7XFiWAAk3SzGD5I6nWNrOMluoal4YD%2FwMdgvYEtxjlaDvgq%2FLaMA1%2BHVjIzxSJ0O7LjXJH%2F9mCeUvnNnSkeiIkKlUR9Qg6VbLfyofwBgYTCkQEavdFrK07dZMDu84oI%2BVE6Y0GURzJI6KhoJOORn5IbOxYnBByKAw%3D%3D&returnUrl=https://localhost:4200
2- on calling this url with identity server url getting following error:
Getting above error from:
await EmailSender.SendAsync( user.Email, "EmailConfirmation", emailContent,true );
During debug got following error message: {"The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."}
Host Logs have no Error [ERR] record
still not working i.e. not receiving email.
Where exactly i have to replace
Hello maliming, Thanks for help. current solution is working fine but our app is not sending the confirmation email while creating new user. Consider following steps:
1- Email confirmation enabled
2- SMTP configured in Host Json 3- NOTE: We have overridden the User creation App service like below sample
public class MyIdentityUserAppService : IdentityUserAppService
{
public override async Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input)
{
IdentityUserDto identityUserDto = await base.CreateAsync(input);
return identityUserDto;
}
}