Skip to content

Commit

Permalink
feat: merge provider metadata on link account (#1552)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
hf authored Apr 23, 2024
1 parent 1cb4f96 commit bd8b5c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/api/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ func (a *API) createAccountFromExternalIdentity(tx *storage.Connection, r *http.
return nil, terr
}

if terr = user.UpdateUserMetaData(tx, identityData); terr != nil {
return nil, terr
}

if terr = user.UpdateAppMetaDataProviders(tx); terr != nil {
return nil, terr
}
Expand Down

0 comments on commit bd8b5c4

Please sign in to comment.