You need to sign in to do that
Don't have an account?
GÜNES Admin
LWC: How to validade username and password against SF credentials?
Hello Developers!
In my custom object LWC, when certain critical action is requested such as "cancel record", I want the user to provide their SF credentials, as eSignature, which is then recorded as audit trail.
I already know how to prompt for the username and password!
My Question is:
How to I check the on-screen captured username and password, validate them against the user's SF login credentials?
Thanks,
Adrien
In my custom object LWC, when certain critical action is requested such as "cancel record", I want the user to provide their SF credentials, as eSignature, which is then recorded as audit trail.
I already know how to prompt for the username and password!
My Question is:
How to I check the on-screen captured username and password, validate them against the user's SF login credentials?
Thanks,
Adrien
Hitesh chaudhari
- As per my understanding, You cannot get the password but you can get the user easily by UserInfo.getUserId().
- As you want to validate user details you can use OTP functionality by sending OTP via Email using an Email alert of SMS like Twilio, or messagebird.
- Using UserInfo.getUserEmail(); you can get email of current login user.