mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
Closes #11191 # Which Problems Are Solved This PR fixes the IDP linking for accounts with no authentication method. We strictly validate session ownership and generate a hash of the sessionId + the user's fingerprintId cookie. This hash is passed to the IDP as linkFingerprint. This PR addtionally addresses TypeScript errors regarding unknown types in catch blocks within the IDP intent processing logic. It ensures that errors occurring during IDP linking are safely handled, and that meaningful error messages are propagated to the client-side redirect URLs. # How the Problems Are Solved - Safely handle unknown errors: Updated catch blocks in `processIDPCallback` to check if the caught object is an instance of Error before accessing error.message. - Fix "IDP Taken" check: Implemented a safe check for the gRPC error code 6 (Already Exists) by casting the error, resolving the Property 'code' does not exist on type 'unknown' build error. - Error Propagation: The specific error message is now passed to the linking-failed page params, allowing for better user feedback instead of generic errors.