To be honest I have no clue either. Sometimes you do most of the damage they get killed by someone else within 5 seconds and no assist. And other times I do a bit of damage get killed myself and like 20 sec after I still get a assist? So after more then 150+ hours of PvP I cannot provide a answer to this question. It seems a bit random. But sometimes I have got an assist like 30/40 seconds after.
I do have a theory tho, that the max amount of assists that are given for one kill is 2. So if 4 people attack one person 1 gets the kill and 2 get assists and the last one doesn’t get anything even if he/she did the most damage. I think its the last people that did the damage get the assist it doesn’t matter how much damage you did. And I think if the killer is getting healed the healer will get 1 of the 2 assists.
This theory does need testing but it is hard to test.