Hey, We are unable to log in with a newly created user from the application and below is the entry created in abp core database. Please let us know that anything I'm missing.
5 Answer(s)
-
0
Hi,
do you get any error messages or logs inside the api host when the user tries to log in?
From what i see the user is fine. Do you have enabled that the user must confirm his/her email before he can login? You could set EmailConfirmed to 1 and try again.
-
0
Hi ,
tried the above solution but still facing same issue and below is the error
2023-08-10 03:56:56.995 +00:00 [INF] Executed page /Account/Register in 836.3275ms 2023-08-10 03:56:56.995 +00:00 [INF] Executed endpoint '/Account/Register' 2023-08-10 03:56:57.097 +00:00 [ERR] An unhandled exception has occurred while executing the request. System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state) --- End of stack trace from previous location ---
Thanks
-
0
The logs you provided show that the system cannot send mails. Please verify that the smtp settings are configured correctly.
-
0
Any settings to disable email feature during user registration process?
-
0
There is no setting to disable the email confirmation during user registration.
If you want to disable the sending of the email confirmation you would need to override the AccountAppService and overide the RegisterAsync-Method like this:
public override async Task<IdentityUserDto> RegisterAsync(RegisterDto input) { await CheckSelfRegistrationAsync(); if (await UseCaptchaOnRegistration()) { var reCaptchaValidator = await RecaptchaValidatorFactory.CreateAsync(); await reCaptchaValidator.ValidateAsync(input.CaptchaResponse); } await IdentityOptions.SetAsync(); var user = new IdentityUser(GuidGenerator.Create(), input.UserName, input.EmailAddress, CurrentTenant.Id); input.MapExtraPropertiesTo(user); (await UserManager.CreateAsync(user, input.Password)).CheckErrors(); (await UserManager.AddDefaultRolesAsync(user)).CheckErrors(); //disable sending email confirmation mail for registrations //if (!user.EmailConfirmed) //{ // await SendEmailConfirmationTokenAsync(user, input.AppName, input.ReturnUrl, input.ReturnUrlHash); //} return ObjectMapper.Map<IdentityUser, IdentityUserDto>(user); }