How to sign up and log in from the same button

Question: Is there a way to automatically sign up the new user if their email isn’t recognized after trying to log in?

The facebook plugin has a single button that handles both sign up and log in actions. If the user doesn’t exist it creates an account, if the user does exist they’re logged in.

I’m trying to make a button for sign up and log in via email, the normal way, but bubble only seems to split those into two different actions.

The trouble is that I don’t know ahead of time which applies to this user. I need to check to see if they already have an account. I don’t see why they can’t just automatically be logged in or signed up based on whether or not their email is recognized.

I tried putting the two actions one after the other, but the error from the first failed action terminates the workflow.

There’s a way to catch all errors and maybe handle them manually, but it would be smoother to just automatically go to sign up if the email isn’t recognized.

Hello @blueback09 i created this little page for show you how to do a search in your database and check if a user using email as filter exists.

You can’t create an account with only one field. We need at least the password.

Check this editor/page and play/learn all what you need is in there.

If account doesn’t exist:
https://puu.sh/Ay2nP/6ba4461f40.gif

If account exist:
https://puu.sh/Ay2pz/bcef9f7ceb.gif

Page: https://loginsignupforum.bubbleapps.io/version-test

Editor: https://bubble.io/page?type=page&name=index&id=loginsignupforum&tab=tabs-1

Best regards.

Okay, so let’s see if I follow.

Are you running a search that returns all users and then testing if any of their email fields contain the email that’s in the input? That’s clever. I hadn’t though of searching for the email directly.

I implemented it a little differently.

I’ve still got just the one button for join/login via email. The first two actions run a search for users with matching emails and the workflow splits into two custom workflows, one for login and one for signup.

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