What is the equivalent of user_set_authmaps()? I need the equivalent function for user_set_authmaps(), in Drupal 8. 

What function/method replaced it?
As reported in {authmap} deprecation, the authmap database table has been removed from Drupal 8; at the same time, the functions using that database table (such as user_set_authmaps()) has been removed.

The suggested alternatives are:


Write your own solution for managing user external authentication and storing remote identities
Use the External Authentication module