Implementing Email-Based Login in FMBetterForms

Joao Coutinho:
Hi everyone! Wishing you all a fantastic 2025.

I have our catalog hosted on FMBetterForms, and all pages are protected with authentication.
I’d like to implement email-based login, where the user would simply enter their email on the login page and then receive a link to log in.

In WebDirect, I handle this by generating a token with a 30-minute validity. When the link is accessed, FileMaker performs a Re-Login using the credentials stored in the tokens table.

Is there a way to achieve this in FMBetterForms?
I’ve watched the SmartLinks video (https://fmbetterforms.screencasthost.com/channels/cYXlnxV6pp), but it doesn’t seem to fit my scenario since all pages require authentication.

Thank you in advance for any guidance or suggestions!


Andrew Dam:
You can use the same smart link workflow in that video and modify it to fit your use case.

The onFormRequest would use the token in the link to fetch the stored credentials and pass them to the front end and subsequently trigger an authLogin action which would log the user in.


Jason Wood:
Fetch the stored credentials? How would that work?

I was recently thinking of building something like this but figured I’d have to use a Bcrypt micro service to hash a token, put that in the password hash field in the user table and then send the token out to the client to run AuthLogin.


Delfs:
Drop a cookie and that’s sent in every hook