12
Views
8
Comments
Solved
Registered Users Unable to Log In

Hello, everyone

I've been using OutSystems for about a month in order to create a reactive wesbite. However, I've been running into some problems regarding User Login. 

I have created a register page, where users can register themselves. After filling the form and clicking the register button, I'll check the User application (http://<environment address>/Users ), and there will be a new user, which is the one I registered previously. However, when I try logging in, I'll recieve a message box stating: "Wrong username or password". Nevertheless, if I edit their password in the User application, I will be able to log in.

Summing up, why are registered users unable to log in, unless I set their passwords manually?


Thank you

Rank: #630
Solution

T F wrote:

Miguel Chaparra wrote:

Hi T F,


In the CreateUser action are you sure you are setting the password to the encrypted value you get from the EncryptPassword action?


Regards,

Miguel Chaparra

 Hello, Miguel

That seems to be the problem with my login, howeverm I only have one source

In my case, my only source is the local variable User, which relates the User's Name, Password, etc. to the typed values. Do you know how to fix this?


Thank you

 Hi T F,


You can assign the encrypted value to your local variable using one assign before the Create user action. Or if you remove the variable User in your source, you will see a "+" before the text Source in the action, clicking that you will be able to assign the value one by one as I showed in the previous print.


Hope it helps :)


Regards,

Miguel Chaparra

 

Rank: #630

Hi T F,


Probably it happens because you are not encrypting the submitted passwords in your form. You have to encrypt the password first and then use the encrypted password in the CreateUser action.

You can find the EncryptPassword action here:


Hope it helps,


Regards,

Miguel Chaparra

Rank: #630

Hi T F,


Can you create a user with username "test" and password "test" and show me how it saves? 

Example of aggregate with Users as source and filter for the "test" username.


If the password isn't encrypted it will look like this and you can't login properly:



Regards,

Miguel Chaparra

Rank: #630

Hi T F,


In the CreateUser action are you sure you are setting the password to the encrypted value you get from the EncryptPassword action?


Regards,

Miguel Chaparra

Rank: #14421

Thank you very much, Miguel

This has fixed my problem


Kind regards,

T F