Account uid changes
Scenarios
- Socialze.setUID
- Allows renaming of account UID
- Allows merging two accounts (changing to an existing UID)
- Account Linking
- Logging in with the same email (2 social providers)
- Updating email to existing email (profile update)
- Manually linking via api.
- Progression between different UIDs
Use updates stream to track uid changes
change type
| Change type | Description |
|---|---|
| delete | when an account is deleted. |
| merge | when tow accounts merged . |
| move | when an account's uid is renamed. |
changes details format
progression
{
"type": "merge",
"UID": "123",
"details": [
{
"op": "replace",
"path": "/accountType",
"value": "full"
},
{
"op": "replace",
"path": "/uid",
"value": "456",
"oldValue": "123"
}
]
}
link-account
{
"type": "merge",
"UID": "1235",
"details": [
{
"op": "replace",
"path": "/uid",
"value": "4567",
"oldValue": "1235"
}
]
}
set-uid
{
"type": "move",
"UID": "780",
"details": [
{
"op": "replace",
"path": "/uid",
"value": "9999",
"oldValue": "780"
}
]
}
Use webhooks to track uid changes
notification type
| Event type | Description |
|---|---|
| accountMerged | when tow accounts merged . |
| accountUidChanged | when an account's uid is renamed. |
| accountProgressed | when a lite account registering the syste,. |
notification format
{
"type": "accountMerged",
"id": "549f3f9b-XXX-XXX-XXX-XXX",
"timestamp": 1587917548,
"callId": "0fc9XXX",
"version": "2.0",
"apiKey": "4_PBxxxZ-Q",
"data": {
"accountType": "full",
"uid": "33cxxx797",
"newUid": "45dyyy678"
}
}
{
"type": "accountUidChanged",
"id": "549f3f9b-XXX-XXX-XXX-XXX",
"timestamp": 1587917548,
"callId": "0fc9XXX",
"version": "2.0",
"apiKey": "4_PBxxxZ-Q",
"data": {
"accountType": "full",
"uid": "33cxxx797",
"newUid": "45dyyy678"
}
}