My way to do this is to create a URL which can be clicked by the user which contains a generates hash (stored in the user table). This URL is sent to the user via mail:
http://localhost:8085/verification/email?key=71e9d875-91b4-4e40-a25f-f14ed5acecef
For this URL I have created a REST service ,,,
,,, which starts a microflow that uses the key to find the corresponding user for changing his status:
You should look at the Forgot Password module in the app store. It has an option to register users as well as providing a way to recover passwords. That module can be found here: https://marketplace.mendix.com/link/component/1296