typescript icon indicating copy to clipboard operation
typescript copied to clipboard

[Bug]: External IDP already taken (V3-DKcYh)

Open Quentin-Gillet opened this issue 1 year ago • 1 comments

Preflight Checklist

  • [x] I could not find a solution in the documentation, the existing issues or discussions
  • [x] I have joined the ZITADEL chat

Version

Latest github push (10/03/2025)

Describe the problem caused by this bug

During the OAuth/OpenID Connect login flow with external identity providers (like Google), users are encountering errors when being redirected back to the application. Specifically, the system attempts to link an external identity provider to a user account multiple times, resulting in an error message: ConnectError: [already_exists] External IDP already taken (V3-DKcYh). This prevents users from successfully authenticating through the external provider. This only happen if the user is login in for the first time, so when the user is created.

To reproduce

  1. Configure an external identity provider (e.g., Google) in the login application
  2. Initiate a login flow by clicking on the Google sign-in button
  3. Authenticate with Google credentials
  4. Observe the console logs when redirected to the /idp/google/success page
  5. The page attempts to link the external identity twice, causing the second attempt to fail

Screenshots

Image

Expected behavior

The page should only render once, and the IDP linking process should only execute a single time per user login attempt. After successful linking, the user should be seamlessly redirected to their destination without errors.

Relevant Configuration

No response

Additional Context

No response

Quentin-Gillet avatar Mar 09 '25 23:03 Quentin-Gillet