Saml login, Idp, discourse sso

Client 1 - Discourse
Client 2 - Rails New
.
Client 2 login -> Redirect -> Client 1 -> LOGIN/Already LoggedIn -> Redirect Client 2 -> Successfully Login
How can I use discourse saml and above process. After install plugin How to use external idp (onelogin).