Hi,
I have a custom login form. I’m having users open the ToS in a new modal, with the checkbox at the bottom of the modal. I need to capture whether user has agreed to ToS (that is, selected the checkbox).
Before, I gated the Login button in the form itself, so it is disabled if user hasnt selected the ToS. But now, I need user to select ToS every year. Hence, my new approach is:
- Add “Read our Terms of Service and User Agreement” link at the bottom of login box.
- When user clicks on Terms of Service link, open a Modal with ToS and a checkbox “Agree to ToS”.
- Capture whether user has agreed to the ToS or not (checkbox.checked).
- In Post-Login actions, check whether user has agreed to ToS or not.
4.A. If user has accepted ToS, set the “tos_accepted” date in user_metadata.
4.B. If not, check if user has accepted before in the past year. If yes, allow user to login. If not, throw an api.deny error that user needs to accept ToS again. (There’s also a bit that checks if this is user’s first login and if they have accepted ToS, but that’s irrelevant for this discussion).
I’m looking for a way to capture data from custom login form and send it to Post Login Actions.
I tried Lock but it was very confusing to me. Especially since I would need ToS to be accepted annually instead of just at sign up. It doesnt fit my needs.