<@U04UQ68083H> Our project allows for multiple way...
# ory-copilot
l
@chilly-king-10285 Our project allows for multiple ways for a user to login (with a code, and a password) is there a way in login to have a user enter their email and then start the appropriate flow for them?
b
A message from kapa.ai
Yes, Ory supports an "identifier first" authentication flow, which allows you to prompt the user for their email (or other identifier) first, and then, based on the identifier, present the appropriate authentication method—such as password or code. This is particularly useful when you want to offer multiple login methods and dynamically select the right one for each user. For Ory Network, you can enable this by turning on "Account Experience 2.0" in the Ory Console under Branding → Theming. For self-hosted Ory Kratos, set the following in your configuration:
Copy code
yaml selfservice:   flows:     login:       style: identifier_first
With this setup, after the user enters their email, the system can determine which authentication methods are available for that user and prompt accordingly (e.g., password if the user has one, or code if they use passwordless login) [Identifier first authentication](https://www.ory.sh/docs/identities/sign-in/identifier-first-authentication). This approach is also reflected in industry best practices, where the login process is split into stages: first collecting the identifier, then determining and presenting the available authentication options for that user [Log in with SAML Single Sign-On](https://www.ory.sh/docs/polis/guides/login-with-saml-sso). Note: If you want a single page that handles both sign-in and sign-up with code (passwordless), you will need to implement a custom UI that, after collecting the email, checks if the user exists and then triggers either the login or registration flow accordingly. This is possible with Ory Kratos, but requires some backend logic to determine the correct flow [Unify sign-in and sign-in page to single input for passwordless "code" login](https://github.com/ory/kratos/discussions/4294).