To determine if it's a user's first sign-in, you can use Ory Actions, specifically the login actions feature. Here's how you can approach this: 1. Ory Identities supports actions for user-related events, including login. You can use login actions to automate behavior in response to users logging in to your application. 2. As mentioned in the [Ory documentation](
https://www.ory.sh/docs/kratos/hooks/configure-hooks#actions-in-ory-identities), you can use Ory Actions to "send welcome emails to users that log in for the first time." 3. To implement this, you would need to create a custom login action that checks if it's the user's first login. This could involve: - Checking a "first_login" flag in your user database - Comparing the current login timestamp with the user's creation timestamp - Checking if certain user profile fields are empty (indicating they haven't been set up yet) 4. Once you've determined it's the user's first login, you can perform specific actions such as: - Sending a welcome email - Updating user information in your database - Redirecting the user to a special onboarding flow Unfortunately, the provided knowledge sources don't contain specific code examples for implementing this functionality. You would need to create a custom action using Ory's action system to achieve this. If you need more detailed information on how to create and configure actions in Ory, you may want to consult the Ory documentation on actions and hooks.