I am using User_login() action to login using particular credentials which is coming as username and password input parameter.
Input parameters are carrying appropriate data and even the entry has been created in system's user table successfully. But I'm getting error as "Invalid username or password " whenever it passes through User_login() action. Please help on this.
You might be passing the plain password directly to the User_Login().
1-call the EncrytpPassword() before & provide the plain password to this action, it will return you a SaltHash
2- Now give this SaltHask i.e Output of EncryptPassword Action as a Password to User_Login()
You can find EncryptPassword action in Users Module
assif_tiger wrote:
Hello Assif,
I have passed encrypted password already in password parameter.
Hi Shweta,
Verify if the UserProvider of your modules is "Users"
Thanks !
Pedro Costa wrote:
Yes, the user provider is set to Users.
Is your application MultiTenant ?
If yes then make sure your are Switching the Tenant
No..my application is not multi tenant.
Shweta Gedam wrote:
Can u Share the service center logs for the same,
also, check whether the user is blocked because of multiple invalid attempts
Action to login using username and password as credentials.
Inputs
So, if you are passing encripted password, that's the problem.
Cheers
Eduardo Jauch wrote:
I removed the encrypted password but still getting same error.
Hi,
either you have made changes in encryption(which encryption you are using) that makes error while comparing the password or you are comparing the password(text) with encrypted password.
I would suggest you to do a POC for the same, you can check the code in new app auto generated by OS for login.
Try to make new user after you change the code and then login with same.
Hello Shweta,
If the User Provider is right and you are passing username and pass not encripted to user login action, but still receives the invalid error message, probably you are trying to login with a user that does not exists or the password is just wrong.
Go to the Users application, check your user to see if you are not passing the user name instead of username.
Then, reset the password to something as simple as 123456 and try again.
Just to rule out a mismatch in user or password.
Cheers.
I'm doing registration of a new user(Sign up flow). And after the registration is completed user will be automatically login to the application with the provided username and password and it will redirected to the dashboard page.
I have checked the username and password, these are correct.
Is it possible to share the module, or a version with the login flow, so that we can take a look?
Cbeers
this problem have solution? i have getting the same problem. and i down't know how why.
some member cannot login system, after reset the password also cannot login.but some member are login succesully.
Have you checked if those users are not blocked?
Also, how are you creating the users. You may want to check if there are duplicated usernames in user entity, that could lead to login problems.
Hi ,
Can you let us know where are you creating password for user from "Users"(https://<domain>/Users) application or you have create form for user create,
if you are creating a form for user registraion than should check when insert password in db it should be encrypt
like below image-
Hope this will help you.
Regards
Rahul Sahu
Please share sample OML.
Thanks
Getting the same error
I had not added the users dependency , once i got that added the issue was resolved
Hey Shweta, got to Module>Manage dependencies, and search for Users dependency, it might have gotten deleted.
Hi Shweta
I have to get the same problem, but when I applied EncrytpPassword, Problem was resolved
You might be passing the plain password directly that's why you got an error,
You need to call the EncrytpPassword before. And then try to log in.
Please let me know if it works for you.
Vednarayan
Hi!I have applied the encrypted password. Still, the issue persists.
I'm unfortunately experiencing same problem.
I have tried to implement a reset password functionality, unfortunately when the password has been reset, I can't use the new password to login.
When reseting the password I'm using System EncryptPassword, and I can confirm that the encrypted password is stored in the system User table.
When perform the login I pass the password from the input field to the system server action: User_Login (I'm not using the former EncryptPassword since I presume the User_Login function will be doing it).