fix: added login_hint to the idp intent (#11552)

# Which Problems Are Solved

In login V2, when the user started the login flow of an external IDP,
there was no login_hint passed to the external provider. This required
the user to enter their username again. Whilst they already entered it
in Zitadel. By adding the `login_hint` parameter, the username should
already be filled in on the external idp.

# How the Problems Are Solved

Pass the `login_hint` parameter to the external idp.

# Additional Changes

Also added the `login_hint` to the event-store for audit trailing.

# Additional Context


- Closes #11392

---------

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Wim Van Laer
2026-02-13 14:34:32 +00:00
committed by GitHub
co-authored by Copilot
parent 2a2d5392a3
commit ca6bd9d6a2
11 changed files with 225 additions and 19 deletions
+3
View File
@@ -26,6 +26,7 @@ type StartedEvent struct {
SuccessURL *url.URL `json:"successURL"`
FailureURL *url.URL `json:"failureURL"`
IDPID string `json:"idpId"`
LoginHint string `json:"loginHint"`
IDPArguments map[string]any `json:"idpArguments,omitempty"`
}
@@ -35,6 +36,7 @@ func NewStartedEvent(
successURL,
failureURL *url.URL,
idpID string,
loginHint string,
idpArguments map[string]any,
) *StartedEvent {
return &StartedEvent{
@@ -46,6 +48,7 @@ func NewStartedEvent(
SuccessURL: successURL,
FailureURL: failureURL,
IDPID: idpID,
LoginHint: loginHint,
IDPArguments: idpArguments,
}
}