# Login/signup with mobile. Can't tell whether user has registered before because of privacy rules

**URL:** <https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720>\
**Category:** Database\
**Created:** [August 2, 2021, 10:36am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720 "2021-08-02T10:36:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![HBee](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@HBee](https://forum.bubble.io/u/HBee)\
**Post date:** [August 2, 2021, 10:36am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/1 "2021-08-02T10:36:07Z")

</div>

Hi there bubble family 😃

I have created a workflow that allows users to sign up with their mobile number. This is how it goes:

1. user types in mobile number. Sends POST request to Twilio Verify which sends them a text message with a code.
2. they enter the code and are then prompted to enter their first name.
3. Upon hitting enter, their account is created. Adhering to Bubble’s built-in workflow, I store the Mobile Number and make the users email and password as follows:

- Email = mobilenumber:append @domain.com
- Password = mobilenumber

Everything was fine and dandy until I added the functionality to check whether the user is already registered. I want the user to enter their phone number like in steps 1 above and 2 above. But if it registers that their number is already registered, and they enter the correct code, I want it to log them in… not continue the signup workflow.

Unfortunately, the privacy settings I have set up don’t allow me to do a search for the user’s email or mobile number. Thus I can’t search for the user by their mobile number.

Here are the privacy settings:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/3/b3de0568d2b9c833eda2f441adf98dbd4070e840.png)

Please note that I don’t want to compromise security and expose peoples phone numbers.

I thought about exposing a fraction of the users mobile number (like the last 6 digits) in a new field. This is a short term fix as people will have similar numbers if I grow, grow and grow.

Am I missing something that’s staring me in the face?

What can I do?

I really appreciate everyone’s help in advance!

Much love 💖

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [August 5, 2021, 7:46am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/2 "2021-08-05T07:46:56Z")

</div>

Hey there @HBee,

Maybe try [this](https://docs.airdev.co/bubble-development-guide/steps/develop/secure-your-app#dont-store-sensitive-data-in-an-unencrypted-format) approach?

Encrypt the phone numbers, then decrypt when you’re checking on if the number exists so you’re not exposing phone numbers

---

<div class="post-metadata">

**Author:** ![HBee](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@HBee](https://forum.bubble.io/u/HBee)\
**Post date:** [August 5, 2021, 8:12am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/3 "2021-08-05T08:12:51Z")

</div>

Thanks for the reply @johnny and great suggestion.

I’ll give this a try using a plugin. Not sure how else to do it.

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [August 5, 2021, 10:30am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/4 "2021-08-05T10:30:12Z")

</div>

Could you have a different sign in flow than registration?

One that assumes user is not registered and one that does?

---

<div class="post-metadata">

**Author:** ![HBee](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@HBee](https://forum.bubble.io/u/HBee)\
**Post date:** [August 5, 2021, 11:09am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/5 "2021-08-05T11:09:23Z")

</div>

Would there be any way to do this without having them click either sign up or login?

If not, I’d prefer to meld both sign up and login into one step to offer a better experience. Research has shown that every extra step decreases the chance people will sign up to your platform by up to 15-25% (don’t quote me on that).

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [August 5, 2021, 11:52am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/6 "2021-08-05T11:52:43Z")

</div>

> [@HBee](#):
>
> having them click either sign up or login?

There’s always gotta be a signup for gated content, right? You could save user on the first login.

Then On your landing page, you could use a condition like:

`If user is logged in on page load, redirect to home.`

Then they only have to remember the root domain and can be taken directly to their “home” upon page load

Like when I go to [gmail.com](http://gmail.com) I log in like once a year but am always taken directly to my inbox without needing to sign in.

---

<div class="post-metadata">

**Author:** ![HBee](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@HBee](https://forum.bubble.io/u/HBee)\
**Post date:** [August 6, 2021, 2:22am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/8 "2021-08-06T02:22:48Z")

</div>

I understand what you’re saying.

But what happens when the user gets logged out or logs themself out?

You can put the initial part of signup and login together. In my case, that is confirming they have possession of the mobile they used to sign up with (using Twilio). This step is important for both the login and signup.

Then it’s possible to lead to different workflows depending on whether the user has an account. If they do, you log them in right away. If they don’t, you lead them to the next step. In my case, it’s providing their phone number.

By combining both the first step of logging in and signing up using mobile verification, I’m abstracting away the need to think about whether you’re logging in or signing up.

Here’s a screenshot of the first step for both logging in and signing up:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/e/7/e7cad02e2178c9037de8b64b3192a3adfedd8a61.png)

---

<div class="post-metadata">

**Author:** ![lindsay\_knowcode](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lindsay_knowcode/32/92967_2.png) [@lindsay\_knowcode](https://forum.bubble.io/u/lindsay_knowcode)\
**Post date:** [September 9, 2021, 5:55am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/9 "2021-09-09T05:55:02Z")

</div>

Might be worth considering the new Magic Link feature for even a less friction login experience?

> [@\[New Feature\] Magic login link workflow action](http://forum.bubble.io/t/new-feature-magic-login-link-workflow-action/164532):
>
> Hi Bubble Community! slightly_smiling_face I’m excited to announce a new Account workflow action. You can now send a magic link to your users via email to allow them to login with the click of a link! You can customize the email content, including the text for the link itself. The link will log the user in, then take them to a page that you specify using the field “Navigate on login”. The link can only be used once, and it expires after an hour. If an…

---

<div class="post-metadata">

**Author:** ![HBee](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@HBee](https://forum.bubble.io/u/HBee)\
**Post date:** [September 10, 2021, 12:11am UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/10 "2021-09-10T00:11:38Z")

</div>

Thanks for showing me this feature. I’ll certainly use it in the future.

At the moment the mobile signup is working and it’s critical I collect their mobile numbers at signup.

---

<div class="post-metadata">

**Author:** ![brekolazh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/brekolazh/32/105286_2.png) [@brekolazh](https://forum.bubble.io/u/brekolazh)\
**Post date:** [September 21, 2021, 4:01pm UTC](https://forum.bubble.io/t/login-signup-with-mobile-cant-tell-whether-user-has-registered-before-because-of-privacy-rules/162720/11 "2021-09-21T16:01:38Z")

</div>

was spiking on this as well, were you ever able to get this up and working Hbee? thanks!
