I want to have a login page where users will enter their email and there will be a SEND OTP button, which should send an email with the OTP value, only if the email already exists in the collection. If it does, then it will redirect them to a page to enter the received OTP and log them in, if the value match. If it doesn’t there should be an error message, that the user is not found.
I know there’s a solution where you set the form to sign up user and with RAND function you can generate an OTP (number property in the collection), but thing is, I don’t want to create a new user. The user has to exist already in the system/collection.
This is for login. Sign up is a whole other story and has to do with the business model, but I won’t get into boring details. Essentially the app is just a small part of a subscription, that someone can buy on our site. So, if you get a subscription, we input your email in the Adalo collection, that’s why the system has to check first if the email is present.
I’m fairly familiar with both make and zapier, so I can’t wait to see your suggestion. Thank you in advance!
This video might be useful for you: https://youtu.be/kQ3v_-us2as. I’ve created it a long time ago, and there are important updates and comments in the description.
It doesn’t answer your question directly, but may give you some ideas. Most of the flow is there except the error message if a user doesn’t exist. And keep in mind that you can simply create a user with Create User action (not signup or login).
From the security perspective, there are better ways to implement this flow, but for a quick MVP such approach should work.