You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the ConnectionHub component detects a pending merge conflict in the session (set by issue #286), display a confirmation modal showing the old account's details. On confirmation, execute a synchronous merge that transfers the current user's data to the old user, deletes the current user, and re-logs as the old user.
End-to-end behavior:
User returns to ConnectionHub after OAuth callback stored a merge conflict in session
ConnectionHub detects oauth_merge_pending in session
Modal displays:
Old user's username
Old user's created_at date
Old user's message count (from ExternalIdentity messages relation)
Explanation: "Your current account will be absorbed by this account and you'll be re-logged automatically"
User confirms → MergeAccountsAction executes inside DB::transaction:
Move all ExternalIdentities (model_type=user) from current user → old user (update model_id)
What to build
When the ConnectionHub component detects a pending merge conflict in the session (set by issue #286), display a confirmation modal showing the old account's details. On confirmation, execute a synchronous merge that transfers the current user's data to the old user, deletes the current user, and re-logs as the old user.
End-to-end behavior:
oauth_merge_pendingin sessioncreated_atdateMergeAccountsActionexecutes insideDB::transaction:model_id)$oldUser->tenants()->syncWithoutDetaching($currentUser->tenants->pluck('id'))first_login_atis null: update email, name, attempt username from current user's datafirst_login_aton old user if nullAuth::login($oldUser)— re-authenticate as the old userKey implementation:
MergeAccountsAction— new action inidentitymodule, accepts current user + old userReference:
app-modules/identity/docs/adr/0001-oauth-user-resolution-and-merge-strategy.mdAcceptance criteria
Blocked by