<@U04UQ68083H> how do i enable automatic account l...
# ory-copilot
m
@chilly-king-10285 how do i enable automatic account linking when the user first signs in with social sign in but later wants to use his password
b
A message from kapa.ai
Ory allows users to link their social sign-in accounts to their existing accounts automatically using a secure flow. Here's how it works: 1. The user creates an account with an identifier (like an email) and a password. 2. When signing in later, the user chooses to sign in with a social sign-in provider. That social sign-in account contains the same identifier. 3. Since the identifier is already registered, the user cannot be logged in directly. Instead, the user will be prompted to enter the password chosen in step 1. 4. After entering the correct password, the social sign-in is linked to the user's account. Now they can sign in with either password or social sign-in provider. However, it's important to note that automatic account linking can be a security risk. To prevent unauthorized account linking, users need to verify an additional credential before the accounts can be linked. In the scenario where a malicious actor tries to link to an existing account, they would be prompted to enter the password associated with the identifier. Here's the [source](https://www.ory.sh/docs/kratos/social-signin/link-multiple-provider-account#automatic-account-linking) for more details.
m
@chilly-king-10285 okay but how do i enable or use it? right now i just get this error "You tried signing in with xxx which is already in use by another account. You can sign in using social sign in. You can sign in using one of the following social sign in providers: Google." Doesnt prompt me to insert password or anything
b
A message from kapa.ai
The error message you're seeing is a standard response when a user tries to sign in with an identifier that's already in use by another account. It suggests that the user can sign in using the available social sign-in providers. However, if you want to enable the feature where the user is prompted to enter their password to link the social sign-in to their existing account, you might need to check your Ory configuration. The documentation does not provide a specific configuration setting for enabling this feature. If you're still having trouble, I would recommend checking the Ory documentation or reaching out to the Ory community for more specific guidance. Here are some relevant links from the documentation that might help: - [Understanding UI nodes and error messages](https://www.ory.sh/docs/kratos/concepts/ui-user-interface#you-tried-signing-in-with-credential_identifier_hint-which-is-already-in-use-by-another-account-you-can-sign-in-using-available_credential_types_list-you-can-sign-in-using-one-of-the-following-social-sign-in-providers-available_oidc_providers_list-4000028) - [User account linking](https://www.ory.sh/docs/kratos/social-signin/link-multiple-provider-account) Please note that the exact implementation might depend on your specific setup and configuration.