210
Views
27
Comments
Solved
Encrypt Password to Change Password
Question
Application Type
Reactive
Service Studio Version
11.54.41 (Build 63060)
Platform Version
11.25.0 (Build 41743)

I'm creating a change pass functionality and im learning and using this logic to the other  user that finding the same functionality too but for me there's a problem when i clicked the scope there is no users included. what seems to be the problem



Here's the one that i'm studying rebuilding the logic

2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

Hi @budang haba 

1. There is no need of passing user id because you are passing whole user record in the action.


2. and in the action convert the input as user only instead of user record.

3. do @Wasim Khan adviced, take dependency utils validate password action.

NOTE : and last combine the both server actions into one. because it does not come under best practices. as you can see there is warning on server action. 

attaching the oml for help.

hope this helps

Thanks

Prince

ChangePasswordupdatedfixed.oml
UserImage.jpg
budang haba

Yes it seems that it cannot be read due to its encryption password. so it always displays "error for old password". Thank you!

UserImage.jpg
budang haba

and may i ask why you said "because it does not come under best practices. as you can see there is warning on server action. "???

2024-05-08 06-29-37
Prince Aadil Khan Panwar

Hi @budang haba

We can not use multiple server actions on screen action. If there is logic and need to use multiple server action. To remove warning we should create new client action paste all server actions there and can get the output in output attribute. And can use this client action on screen action.

Regards, 

Prince

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

If you have multiple server action calls in a client action, that is not performant. Every server action call is call from yours browser to the OutSystems server. If you combine the server calls into on, you have less calls to the server and your application performs better.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Not really the correct answer. It is just a warning, so you can use multiple server actions in a client action. It is however not adviced because of performance.

2024-05-08 06-29-37
Prince Aadil Khan Panwar

yes we can use and the code will work. but it will always show the warning right? and it will be visible in architecture issues right?

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Yes correct. My point was, you mention it is not possible, that is not correct.

It is a warning, so as a developer, tech lead or architect, you need to decide if you can fix this performance issue by merging both server actions in one server action call. There can be reasons per situation that you might not be able to do that. That the warning remains.

You then have two options:

  1. In Service Studio hide the warning
  2. In AI Mentor Studio, you can then mark it as either 'false positive' or 'Don't fix' and write down why.

The purpose of the warning is not to make the warning go and disappear. The purpose is to bring a best practice violation to your attention that you, your lead or architect on the project needs to evaluate, judge and fix or not fix.

2024-05-08 06-29-37
Prince Aadil Khan Panwar

i have mentioned @Daniel Kuhlmann in solution reply that

just i used can instead of should. 

rest i will take care of it next time.

Thanks for your time 

Regards,

Prince

2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

I agree with you @Daniel Kuhlmann


Regards,

Wasimkhan S

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@Prince Aadil Khan Panwar ,

the real problem with your comment is not about 'can' vs. 'should'.

your advice is very wrong, because you suggest people to add both server actions into a single client action.  This doesn't solve the performance problem at all, the only thing it does is hide the warning.

Dorine

2024-06-24 04-49-49
Princi

Hi @budang haba 

Please check out this link - Encrypt Password. It might be similar what you are looking for. 

Regards

Prince Kumar

UserImage.jpg
budang haba

i've tried this but gets an error of "old password wrong"

2024-06-24 04-49-49
Princi

Are you trying with the same encrypted key for changing the password?

2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

Hi,

Hope this video will help.

https://www.youtube.com/watch?v=5wyPvHp6h1U

Regards,

Wasimkhan S

UserImage.jpg
budang haba

i've seen this but still no solution

2023-03-03 06-59-12
Reemali patil

Hi budang haba,

Check out this oml file will resolve your problem.


Regards,

Reemali.

demoPassword.oml
UserImage.jpg
Garima Sharma

Hi Try to use it this way in your password variable assign EncyrptPassword(In_user.UserName,In_User.Password)

Hope this helps


UserImage.jpg
budang haba

here;'s the error

2024-06-24 04-49-49
Princi
UserImage.jpg
Garima Sharma
2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

Hi,

Encrypt password action is a server action. Try to call this in Server action. I think you are calling it in Client action.

Regards,

Wasimkhan S

2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

Hi,

You can try like this if you want to call it in client action.

1.Create a client action like this.

2. Set the Function property of this client action as "Yes".

3. Call this action in screen actions.


Regards,

Wasimkhan S

UserImage.jpg
budang haba

when i create and call it in server action it does not exists 

2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

Can you share your OML?


UserImage.jpg
budang haba

here it is sir. it seems i keep getting the old password is incorrect is that it is encrpyted and it cant read to change it 

ChangePasswordupdated.oml
2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

Hi,

As per your code, you are checking the "Old password" as Text with Encrypted value from Database.

In order to Validate old password. You need to use Validate password action from "PlatformPasswrodUtils".


Please check this post. it will help you how to add this.

https://www.outsystems.com/forums/discussion/86901/how-to-validate-old-password-while-implementing-reset-password/


Regards,

Wasimkhan S

2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

Hi @budang haba 

1. There is no need of passing user id because you are passing whole user record in the action.


2. and in the action convert the input as user only instead of user record.

3. do @Wasim Khan adviced, take dependency utils validate password action.

NOTE : and last combine the both server actions into one. because it does not come under best practices. as you can see there is warning on server action. 

attaching the oml for help.

hope this helps

Thanks

Prince

ChangePasswordupdatedfixed.oml
UserImage.jpg
budang haba

Yes it seems that it cannot be read due to its encryption password. so it always displays "error for old password". Thank you!

UserImage.jpg
budang haba

and may i ask why you said "because it does not come under best practices. as you can see there is warning on server action. "???

2024-05-08 06-29-37
Prince Aadil Khan Panwar

Hi @budang haba

We can not use multiple server actions on screen action. If there is logic and need to use multiple server action. To remove warning we should create new client action paste all server actions there and can get the output in output attribute. And can use this client action on screen action.

Regards, 

Prince

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

If you have multiple server action calls in a client action, that is not performant. Every server action call is call from yours browser to the OutSystems server. If you combine the server calls into on, you have less calls to the server and your application performs better.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Not really the correct answer. It is just a warning, so you can use multiple server actions in a client action. It is however not adviced because of performance.

2024-05-08 06-29-37
Prince Aadil Khan Panwar

yes we can use and the code will work. but it will always show the warning right? and it will be visible in architecture issues right?

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Yes correct. My point was, you mention it is not possible, that is not correct.

It is a warning, so as a developer, tech lead or architect, you need to decide if you can fix this performance issue by merging both server actions in one server action call. There can be reasons per situation that you might not be able to do that. That the warning remains.

You then have two options:

  1. In Service Studio hide the warning
  2. In AI Mentor Studio, you can then mark it as either 'false positive' or 'Don't fix' and write down why.

The purpose of the warning is not to make the warning go and disappear. The purpose is to bring a best practice violation to your attention that you, your lead or architect on the project needs to evaluate, judge and fix or not fix.

2024-05-08 06-29-37
Prince Aadil Khan Panwar

i have mentioned @Daniel Kuhlmann in solution reply that

just i used can instead of should. 

rest i will take care of it next time.

Thanks for your time 

Regards,

Prince

2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

I agree with you @Daniel Kuhlmann


Regards,

Wasimkhan S

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@Prince Aadil Khan Panwar ,

the real problem with your comment is not about 'can' vs. 'should'.

your advice is very wrong, because you suggest people to add both server actions into a single client action.  This doesn't solve the performance problem at all, the only thing it does is hide the warning.

Dorine

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.