One time login through multiple pages

I have a website with multiple subdomains. I was wondering if it’s possible to implement that user must only login once (for example on https://example.com) and be automatically logged in on other subdomains when he visits them (e.g. https://sub1.example.com, https://account.example.com, etc.).