Signup Confirmation Conditions

I’m attempting to create a user validation process since Bubble does not allow for manual creation of user information and a default password. I don’t want just anyone finding and using the app by creating an account with any email. I need the app to be for employees only, so what I want to do is:

User clicks Signup > Signup Pop Up appears > User inputs company email > User inputs password > User input to confirm password > Application takes the input value for the email and checks it against the database of company emails that are pre-populated and if the input email matches the same email in the database… > Send confirmation link to email.

Can’t seem to find the correct logic to do this. I’ve tried the “Only when” section to see if I could possibly use:

Only when: Input Email (sign up)'s value is Search for Users (email = Input Email (sign up)'s value)

Basically, the logic should go: “Only send confirmation email if the user input for email is equal to the exact match for an email in the database.” I can’t seem to find a way to make the app verify the email, as "Only when: Input Email (sign up)'s value " only follows with “is, is not, contains, doesn’t contain, is empty, is not empey, etc” and nothing I can use besides “contains” and “is” that would even mean “equal to.” Using is just brings up another menu of things for “Current User, Do a Search For, Get an option, Get data from external API, Calculate formula” and then options for objects that I’ve created (text input boxes, map, search boxes, etc). Below that is “App Text(?), Arbitrary text/date/time, etc.”

I’ve been back and forth with the logic, having the “IF” (Only when) statement start with the signup step (1) where it will not submit the user account for creation unless the input email matches the database email. I’ve also added a 2nd step to see if I could run a verification first before sending the email confirmation. Then I attempted to just do Step 1 (Signup) with Step 2 being the email confirmation with the “Only when” statement from above.

Anyone have some insight on how to go about doing this?

Hey @r.inks :wave:

Thanks for the post and cool idea! We actually have quite a few users that are building apps like this (where not just anyone can sign up) so I might have a solution that’ll fit better.

What most people do is build a page in the app specifically for admins (or even other users) to invite people to the app. This page would have an input for email (and even other info like name, phone, position etc). The workflow to do this would be to ‘Create an account for someone else’ and in that action you can define those other field values if you plan to include them. Once the account is created, you could do one of two things… Either, send an email with a temporary password and the user would be prompted to change their password the first time they log in. Or, you could use our new magic login feature which sends a link that by passes the need for a password altogether.

Both routes would allow you to not even have a signup form on your app which would eliminate the risk of random people signing up and then you don’t have to deal with email validation logic. :slight_smile:

Give it a try and feel free to reach out with any additional questions to Support@Bubble.io

3 Likes

This works great! Thanks

Perfect @r.inks Thanks for the update! I’m glad to hear you were able to get this up and running.

We’re here to help if anything else comes up → Support@Bubble.io

This topic was automatically closed after 70 days. New replies are no longer allowed.