The username or password you entered is incorrect

1
I have created a simple login/registration form. The registration is fine but the problem is the login. Once I entered the registered login credentials (username and password) in the login page, the annoying "The username or password you entered is incorrect " keeps popping up. I made sure like 1000 times I have not typed them incorrectly, but the error persists. Below are the screenshots of components which might have triggered this error. Could anyone suggest me a solution? My Mendix Pro version is 10.4.1.  
asked
4 answers
1

Hi Mami,

 

In the console, I can see the message that the user is unknown. So the registration did not fully succeed. Maybe it is in the different entities you are using. What are the anonymous and unknownuserenitity. And has the entity you use for your accounts a generalization of system. user or Administration.user? 

answered
0

Hey Mami!

Taking into account your last comment the problem that you currenly have is that you are creating an object of the UnknownUserEntity that doesn't allow the user to log in.

 

To allow the user to log in, a user object or account or a generelization of them should be created. Normally in these cases what we usually do is to create a NP entity in your case UnknownUserEntity to collect the info of the login form ( as the anonymous user shouldn't be able to interact with the user/account entity directly) and then on the microflow that is trigger on the save, create for example an account with the info that is contained in the UnknownUserEntity.

 

Hope this helps you to understand how this part works

Kind regards,

Emilio

answered
0

I'm gonna show you a simple example of the flow:

image.png

 

You should receive the unknow entity as paremeter and within the flow a create activity to create the new account for the log in. On that create activity you should fill the attributes:

image.png

You need to take into account that the user is going to use the Name and the password to access the application.

answered
0

Hi Mami,

 

You have to create a custom login page when using anonymous users. Ryan's post on it you can find here:

https://www.mendix.com/blog/enabling-security-and-adding-a-login-page/https://www.mendix.com/blog/enabling-security-and-adding-a-login-page/

 

This will do the trick. I don't know what is causing your problem, but when following the steps exactly, it can't fail.

 

Go Make It

answered