Hello,
I want to login users with their email ID on a specific scenario i.e. on a successful payment. all the password on the system are hashed. Is there anyway to login with only Email ID?
I tried to look into the login codes there are so much of codes. what are the specific functions/methods needs to be called for successful login?
Regards, Gunpal Jain
2 Answer(s)
-
0
Hi,
You have to copy all codes inside Login action of Accoutn cotroller. The place which password checked is in this line
var loginResult = await _logInManager.LoginAsync(usernameOrEmailAddress, password, tenancyName);
You have to copy _logInManager.LoginAsync code into your project and modify the places for password check. You can find it here. <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/blob/cab121b66dcaf4884cd23ae3f4f0c22f67734eef/src/Abp.Zero/Authorization/AbpLoginManager.cs">https://github.com/aspnetboilerplate/mo ... Manager.cs</a>.
If you want paid users always enter without password, you can apply another approach. Change their password to something fixed like "123qwe" when the payment is successfull. Then use regular login action with this fixed password for paid users.
-
0
Thank you for your reply.
I resolved it by using IAuthenticationManager in the controller.
Regards, Gunpal Jain