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

Job ID: 36333884

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