How to use the same users table on multiple wordpress sites

I have 3 wordpress sites and I want users to be able to connect to all of them with the same account. The sites are currently in the same domain and everyone has a subdomain.

I was wondering if there is a way to fetch users from a different database or to share a users table with all the sites