You can restrict user sign-in to certain email domains by using Ory Actions to add extra validation during the sign-up process. This allows you to control exactly who can sign up. For example, you can prevent users from signing up when their email domain doesn't match a certain value. This way, you can allow only users from certain organizations to sign up. To implement this, you would use flow-interrupting webhooks to add this validation to sign-up and registration flows. Unfortunately, the exact code or configuration to achieve this is not provided in the knowledge sources. However, you can refer to the [Flow-interrupting webhooks documentation](
https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#flow-interrupting-webhooks) to learn more about how to use them. Additionally, Ory Identities allows you to configure hooks that run before and after a Login Flow. This may be helpful if you'd like to restrict logins to certain conditions or logic. You can read more about hooks in the [Hook Documentation](
https://www.ory.sh/docs/kratos/hooks/configure-hooks). Please note that you would need to have a good understanding of how webhooks and hooks work in Ory, and possibly some programming knowledge to implement this feature. If you need further assistance, you might want to consider reaching out to the Ory community or seeking help from a developer. Sources: - [Customize login and registration behavior](
https://www.ory.sh/docs/identities/sign-in/actions) - [Hooks in Ory Identities](
https://www.ory.sh/docs/kratos/self-service/flows/user-login#hooks)