If you are implementing Forgot password functionality in your web application using Liftweb and you have such a scenario where you have to send redirect URL with unique token in Email , Liftweb with Scala provides a wonderful functionality to handle this .
1) Write a function to send URL with unique token in Email .
This function will generate a Unique token url and save unique token in collection.
2) Override handleLoginToken function according to your requirement .
When user would click on URL , he would be redirected to password page . After redirecting , user session would be true and you can get current user . Now ask user for his new password and replace with old password .
Once URL is clicked by user , it would be expired and deleted from login token collection . It can not be used again .
1 thought on “Scala Liftweb : Use Forgot Password Inbuilt Functionality to send Email with Unique Token2 min read”
Reblogged this on Agile Mobile Developer.
Comments are closed.