function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AshDonAshDon 

Alert for wrong password.

Hi, I have a Visualforce sign in page , how do I give alert when wrong password is entered. Thanks
PriyaPriya (Salesforce Developers) 

Hi Ashy,

Kindly refer this article, it has got the entire project :- 
https://help.salesforce.com/articleView?id=external_identity_custom_login_page_login.htm&type=0

Github link :- https://github.com/salesforceidentity/basic-custom-login

Please mark it as best answer if you find the above information helpful.

Regards,
Priya Ranjan 

Boddh Prakash 38Boddh Prakash 38
Hi Ashy,
  • I would like to suggest one solution if you already know about the correct password then you can simple put a validation on visualforce page UI and you can display any message to the actual user.
  • If you don't have any idea about the user password then you can simply check their last login history using below query.
  • First, you need to enable the event monitoring. 
User-added image
  • Select Id, Status, CreatedDate, LoginType from LoginEvent
  • Using above query , you would be able to check user login status where you can simply checj whether the actual user is having login status success with right password or failure with wrong password.
Thanks,
Boddh

 
Suraj Tripathi 47Suraj Tripathi 47
Hi Ashy,

you can set an alert for the wrong password by using  
 ApexPages.message(your field,'your message')

To see the complete example follow the below link.

https://www.sfdcpoint.com/salesforce/show-error-message-visualforce-page/

If you find your Solution then mark this as the best answer.

Thank you!

Regards,
Suraj Tripathi  
simply buzzes 9simply buzzes 9
Hi, Michle thanks for your link i have checked it but there are few 404 issues that i have found with your site please have a look here  (https://139.162.91.135/) to check the all Error in detail. Many Thanks
Anand kurubaAnand kuruba
Hi,
The alert for wrong password 
please follow below link
https://stackoverflow.com/questions/40904446/the-alert-for-wrong-password-keeps-displaying-even-after-i-click-ok-using-javas


Thanks!!