How to encrypt a password using the native encryption algorithm of Outsystems?

How to encrypt a password using the native encryption algorithm of Outsystems?

  

Hi,

I'm new to Outsystems and I'm working on an application that requires the user to create an account within the application. When the user tries to login with that account, the authentication fails. I've checked the Users entity to where the data is stored and notice that the password is written in plain text. I have some data inside the entity that are manually generated (by going to <Environment>/Users) and all the passwords are encrypted. I've suspected that the user_login (server action) only gets the hash to validate the login process.

Is there any way to encrypt my password with this encryption?

Please reply if you have an idea to solve my problem. 

Thank you.

Hi Ralph,

You can use the Action EncryptPassword to encrypt the password before creating the user in the User Entity. That Action is in the Users Module.

Cheers,

José

José Costa wrote:

Hi Ralph,

You can use the Action EncryptPassword to encrypt the password before creating the user in the User Entity. That Action is in the Users Module.

Cheers,

José

Hi José,

Thank you for replying. I just want to clarify where exactly is the Action EncryptPassword? I was seaching it in the Logic tab -> Server Action -> Users but there were no EncryptPassword action.

Thanks,

Ralph


Solution

Hi Ralph,

Go to Manage Dependencies:

Search for Users in the right and Encrypt in the left and you will get the Action that you want. 

Select it and you will get it in your module to use it.

Cheers,

José

Solution

José Costa wrote:

Hi Ralph,

Go to Manage Dependencies:

Search for Users in the right and Encrypt in the left and you will get the Action that you want. 

Select it and you will get it in your module to use it.

Cheers,

José

Hi José,

Thank you so much! I was able to include it into my module.


Thanks for helping me!

Ralph


José Costa wrote:

Dear Jose,

i have try the encrypt password action, however i don't know why it doesn't work.

when i upload the password to the database, it still not encrypt yet. # 




Here is my flow, do i did anything wrong? 

Thank you.


Hi Ralph,

Go to Manage Dependencies:

Search for Users in the right and Encrypt in the left and you will get the Action that you want. 

Select it and you will get it in your module to use it.

Cheers,

José



eva wong wrote:

José Costa wrote:

Dear Jose,

i have try the encrypt password action, however i don't know why it doesn't work.

when i upload the password to the database, it still not encrypt yet. # 




Here is my flow, do i did anything wrong? 

Thank you.


Hi Ralph,

Go to Manage Dependencies:

Search for Users in the right and Encrypt in the left and you will get the Action that you want. 

Select it and you will get it in your module to use it.

Cheers,

José



Hi Eva,

After the EncryptPassword, you have to insert an Assign as shown in my example below:

That should solve your problem.

Ralph wrote:

Hi,

I'm new to Outsystems and I'm working on an application that requires the user to create an account within the application. When the user tries to login with that account, the authentication fails. I've checked the Users entity to where the data is stored and notice that the password is written in plain text. I have some data inside the entity that are manually generated (by going to <Environment>/Users) and all the passwords are encrypted. I've suspected that the user_login (server action) only gets the hash to validate the login process.

Is there any way to encrypt my password with this encryption?

Please reply if you have an idea to solve my problem. 

Thank you.


Hi,


as the people told, in "Manage Dependencies" -> "Users" you have a Server Action called "EncryptPassword" and the paramenter was UserName Value and Password Value in form, and they will encrypt the password.


And you need to overide the value of password field such the next example:




In this case i confirm if this is a new user or not, focus only the first EncryptPassword Function and you solve the problem