Yes. It is fun to throw potions!
Most elixirs such as "Alchemist Fire" have rules for 20/60, so we'll use those as a baseline.
As a bonus action, you can throw a potion 20 feet towards an allied creature where it lands next to their feet.
The potion won't break when you do this. Unless the potion has specific rulings that it is 'vulnerable'.
When throwing a potion between 25 feet and 60 feet. Roll a Sleight of Hand check, the DC set by the DM. (Typically 10-15)
On a failure, the potion breaks on the floor and is wasted.
On the ally creature's own turn, they can use their free object interaction to pick up the potion and use their own action/bonus action to drink the potion.
Throwing a potion towards an ally can be noticed by an enemy, who depending on their own intelligence could use it themselves or even throw it away! Be aware of that!