Skip to content

Commit

Permalink
feat: merge provider metadata on link account (supabase#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 and LashaJini committed Nov 15, 2024
1 parent 79fb2eb commit a03c016
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 a03c016

Please sign in to comment.