Skip to content

Commit bd8b5c4

Browse files
authored
feat: merge provider metadata on link account (#1552)
It merges back the identity data into user metadata on link account. This is safe because the user can just sign-in again and have the identity data merged back (AccountExists case).
1 parent 1cb4f96 commit bd8b5c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/api/external.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ func (a *API) createAccountFromExternalIdentity(tx *storage.Connection, r *http.
298298
return nil, terr
299299
}
300300

301+
if terr = user.UpdateUserMetaData(tx, identityData); terr != nil {
302+
return nil, terr
303+
}
304+
301305
if terr = user.UpdateAppMetaDataProviders(tx); terr != nil {
302306
return nil, terr
303307
}

0 commit comments

Comments
 (0)