No emails send unless user is invited

So in my setup, I have a setup where an admin can create an organization only, and is the only one with permissions to invite users. The invited users then get an email and authenticate themselves, changing their status from invited to active. One problem I am having is that since this application is sensitive we dont want to send an email out to everyone in discovery or anything unless they already exist to an organization, but there is no way to relate it without querying the database by email. Is there a solution to this or should I just scrap magic links altogether?

Hi Rushil,

Thanks for posting!

I see that you also posted this question in our community Slack channel, which I’ve just responded to. For posterity:

An Organization login flow may be what you’re looking for - rather than allowing the end user to “discover” Organizations, they only log into a specific Organization: https://stytch.com/docs/b2b/guides/login-flows.

These login flows are typically hosted at dedicated pages, and only allow users to sign into that specific Organization (for instance, at orgA.myapp.com).

Does this sound like what you’re looking for?

Feel free to follow up either here or in Slack with any additional questions about an Organization login flow!