<@U04UQ68083H> Is it possible to create an Ory Id ...
# ory-copilot
c
@chilly-king-10285 Is it possible to create an Ory Id (register an account) using the magic-link strategy and then allow the user to update the same identity with a different AuthN strategy later? For instance, I create an account with the magic-link strategy and then next time I choose Google SSO and use that strategy in an on-going way?
b
A message from kapa.ai
Yes, Ory supports account linking, which allows users to add multiple authentication methods to their account after initial registration. This means you can create an account using one method (like a magic link or code) and later link it with social sign-in providers like Google. ### How Account Linking Works Ory provides two ways to link accounts: 1. Manual Account Linking: Users can manually link their accounts through their account settings page. After signing up (for example, with a magic link), they can go to their account settings and add social sign-in providers like Google. 2. Automatic Account Linking: This happens when a user tries to sign in with a social provider that uses the same identifier (typically email) as their existing account. The user will be prompted to verify their existing credentials, and after successful verification, the accounts will be linked. As explained in the documentation: > "Users can link their accounts only to social providers you configured in your Ory project. Users can link accounts to start signing in with a profile created in a social sign-in provider when they originally signed up with email and password." [Account linking](https://www.ory.sh/docs/kratos/social-signin/link-multiple-provider-account) ### Important Considerations 1. Security: Automatic account linking requires verification of existing credentials to prevent unauthorized access. 2. Login Hints: To improve user experience, you can enable login hints to show only relevant authentication methods for a user's account. 3. Magic Links vs. One-Time Codes: While magic links are supported, Ory recommends using one-time codes instead as they avoid issues with email scanners invalidating links and work better across different devices. Note that while the documentation specifically mentions linking accounts that were created with "email and password," the underlying mechanism supports linking accounts created with other methods as well, including those created with magic links or one-time codes.