Triggering automatic authentication via SSO when linking to private topics?

You can create an login link on your SSO provider site with a return_path parameter in the URL. After authentication, Discourse will redirect the user to the value set for the return_path. The link should be in this form:

<a href="https://forum.example.com/session/sso?return_path=https://forum.example.com/your-discourse-endpoint">Link Text</a>