Login to different domain and subdomains in ruby on rails, devise and PostgreSQL. "Single Sign-On" SSO

Job ID: 36351129

Budget: $250 – $750 USD

Good I wish a system that the login when starting session also starts session in different domain and subdomain that I have
example:
something similar to google
login to accountsgooglecom also login to youtubecom playgooglecom duogooglecom etc

It must be in a separate database.
Auth.example.com ---->> database with devise
Example2.com ---->>< connected to auth database but has its own database