I am trying to use magic link for passwordless login for three categories of users. new user, returning user who has completed all sign up steps , and a mid-sign up user. so far the workflow works for new users, however as soon as the email of that user is not first in the database, the user is unable to login again as a returning user. Bubble testing shows user already exist. But when that uers’s email is still first item on database, everything works.
The issue is likely in how you’re searching for the existing user. When you do “Search for Users” without sorting/constraints it returns the first record in the DB — so if you’re checking first item's email = input email, it only matches when that user happens to be first.
Instead of grabbing the first item, you should add a constraint directly on the search: “Search for Users where email = magic link email” and check count > 0 to determine if the user exists. Then use that same search’s first item to get the user object.
Can you share a closer screenshot of the workflow step where you’re checking if the user already exists? That’ll help confirm if this is the issue.
Thanks for your response. I was able to solve the problem by changing user privacy settings by checking the boxes for find in searches and email for everyone else


