Best practice for linking accounts

Hello Heroic Labs,
I have an existing Google or IOS player account, and I now want to link it to an existing Steam account. The flow is the player initiates the account linking on Steam, gets a 5 digit code, then enters it in the mobile app (where they have an account already) to complete the link. I just want to migrate the mobile login to the Steam account using nk.link_google and nk. link_gamecenter and delete the mobile account. Now comes the problem – I discovered that in the server RPC:

  • I can’t unlink from the mobile account then link to the steam account - Nakama says I can’t orphan the old account (sensible)
  • I can’t link to the steam account then unlink the mobile account - Nakama says I can’t have two accounts with the same login (sensible)
  • I can’t delete the mobile account then link the steam account - Nakama immediately destroys the Context of the RPC, since it was called from the mobile account, and the RPC immediately errors.

I appear to be out of options. What is the correct way to handle this?

Thanks,
Matt