fix: handle metadata from post authentication on auto creation (#6389)

This commit is contained in:
Livio Spring 2023-08-18 11:16:58 +02:00 committed by GitHub
parent f5f9b39fdf
commit 90a62b777b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,7 +410,7 @@ func (l *Login) externalUserNotExisting(w http.ResponseWriter, r *http.Request,
l.renderExternalNotFoundOption(w, r, authReq, orgIAMPolicy, human, idpLink, err) l.renderExternalNotFoundOption(w, r, authReq, orgIAMPolicy, human, idpLink, err)
return return
} }
if changed { if changed || len(externalUser.Metadatas) > 0 {
if err := l.authRepo.SetLinkingUser(r.Context(), authReq, externalUser); err != nil { if err := l.authRepo.SetLinkingUser(r.Context(), authReq, externalUser); err != nil {
l.renderError(w, r, authReq, err) l.renderError(w, r, authReq, err)
return return