287
Views
17
Comments
User_login action causing error as "Invalid username or password" in mobile app
Question

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. 

Rank: #80

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

Rank: #157

Hi Shweta,


Verify if the UserProvider of your modules is "Users"


Thanks !

Rank: #80

Is your application MultiTenant ?

If yes then make sure your are Switching the Tenant

mvp_badge
MVP
Rank: #5

User_Login

Action to login using username and password as credentials.

Inputs

Username
Type: mandatory, Text.
User's username
Password
Type: mandatory, Text.
User's password (should not be encrypted)
RememberLogin
Type: mandatory, Boolean.


So, if you are passing encripted password, that's the problem. 

Cheers 

Rank: #5386

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.

mvp_badge
MVP
Rank: #5

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. 

mvp_badge
MVP
Rank: #5

Hi, 

Is it possible to share the module, or a version with the login flow, so that we can take a look? 

Cbeers

Rank: #4087

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.

mvp_badge
MVP
Rank: #5

Hi, 

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. 

Cheers 

Rank: #89

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

mvp_badge
MVP
Rank: #128

Hi,

Please share sample OML.


Thanks