I have seen a few users asking how to implement teams in user accounts. I wrote an article on Medium on how to do this without adding any external dependencies or packages. I wanted to know how to do this without adding packages, so hopefully this can help someone that needs this functionality.
This is done using:
I tried making it front-end agnostic. If you have any questions, let me know. I will upload the boilerplate app shortly.
Edit: Here is the boilerplate on GitHub. I also added in methods for three tiers of account types.