[Bug]: External IDP already taken (V3-DKcYh)
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
- Configure an external identity provider (e.g., Google) in the login application
- Initiate a login flow by clicking on the Google sign-in button
- Authenticate with Google credentials
- Observe the console logs when redirected to the /idp/google/success page
- The page attempts to link the external identity twice, causing the second attempt to fail
Screenshots
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