Login to different domain and subdomains in ruby on rails and PostgreSQL. "S.S.O"

Job ID: 36169435

Budget: $10 – $30 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