I have the following user flow, I’m trying to figure out how to do 2a and 2b:
- User inputs email
- a. → If User with that email exits, show login form
b. → If User with that email does not exist, create user - Display a form to gather some simple information and save it to the user.
The problem with 2a is that the users email address is private data, so it isn’t searchable. If I made it public data, then I could search it, but that would also expose the users email address and make them vulnerable to spam scrapers, etc.
For 2a, I could also use “create an account for someone else” and check the “return the user if the account already exists” checkbox…
However, if I do that and the user doesn’t exist, then an account is created and the user is not logged in which means I can’t have the user complete step 3 since they’re not signed in and can’t save to the user.
All of this would be solved if I could figure out a way to check if an account already exists (by email) without publicly exposing the email.