fix(user): Updating user info when authenticating with external IDP (#11046)

# Which Problems Are Solved

User profile updates were not propagated when using External OIDC IDP +
Login V2

# How the Problems Are Solved

* `UpdateHumanUserRequest` is added to
`RetrieveIdentityProviderIntentResponse`
* `UpdateHumanUserRequest` is returned in the
`RetrieveIdentityProviderIntentResponse` when the user already exists
during external IDP auth, which is then used in the frontend to update
the user info

# Additional Changes

* Moved integration tests related to user intent to a separate test file
* Fix redirection after external IDP user registration

# Additional Context
- Closes #10838 
- Follow up: https://github.com/zitadel/zitadel/issues/11053

---------

Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
Gayathri Vijayan
2025-11-10 09:50:36 +01:00
committed by GitHub
co-authored by Max Peintner
parent a3390a0adb
commit d7e9eddb76
7 changed files with 1139 additions and 1017 deletions
@@ -4,6 +4,7 @@ import { registerUserAndLinkToIDP } from "@/lib/server/register";
import { useState } from "react";
import { useTranslations } from "next-intl";
import { FieldValues, useForm } from "react-hook-form";
import { useRouter } from "next/navigation";
import { Alert } from "./alert";
import { BackButton } from "./back-button";
import { Button, ButtonVariants } from "./button";
@@ -55,6 +56,7 @@ export function RegisterFormIDPIncomplete({
});
const t = useTranslations("register");
const router = useRouter();
const [loading, setLoading] = useState<boolean>(false);
const [error, setError] = useState<string>("");
@@ -85,7 +87,9 @@ export function RegisterFormIDPIncomplete({
return;
}
// If no error, the function has already handled the redirect
if (response && "redirect" in response && response.redirect) {
return router.push(response.redirect);
}
}
const { errors } = formState;