From 90a62b777bd8b45aa59bfcbaeeeab1c864f92a08 Mon Sep 17 00:00:00 2001 From: Livio Spring Date: Fri, 18 Aug 2023 11:16:58 +0200 Subject: [PATCH] fix: handle metadata from post authentication on auto creation (#6389) --- internal/api/ui/login/external_provider_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/ui/login/external_provider_handler.go b/internal/api/ui/login/external_provider_handler.go index 7f32726d0f..d895f1aef7 100644 --- a/internal/api/ui/login/external_provider_handler.go +++ b/internal/api/ui/login/external_provider_handler.go @@ -410,7 +410,7 @@ func (l *Login) externalUserNotExisting(w http.ResponseWriter, r *http.Request, l.renderExternalNotFoundOption(w, r, authReq, orgIAMPolicy, human, idpLink, err) return } - if changed { + if changed || len(externalUser.Metadatas) > 0 { if err := l.authRepo.SetLinkingUser(r.Context(), authReq, externalUser); err != nil { l.renderError(w, r, authReq, err) return