Routing from SSO server to forum as logged in

Assuming I implement an SSO server on my application, and have a logged-in user.

The SSO site has a link to the forum, and a logged-in user should be logged in to the forum as well when it is clicked. The user should not have to click anything on the forum to see posts with appropriate group privileges.

Can this be done? How?

If I also implemented an OAuth server would that change things? I’m guessing not because SSO and OAuth are not compatible. Right?

Maybe I just implement the Oauth server. Then, can I disable account creation through the forum interface? Alternatively, use group privileges that are only available through my Oauth server?

This must be a common use-case. What is best to make it all transparent to the user?

Create a link on the SSO Provider site that points to /session/sso. Set the return_path parameter to send the user to a particular page on the forum. If the user is already logged in on the SSO provider site, they will be automatically logged in and redirected to the return_path. If the user is not logged in on the SSO provider site, clicking the link will initiate the SSO login process.

<a href="https://forum.example.com/session/sso?return_path=https://forum.example.com/t/the-topic-slug/1234">Your Link Text</a>
3 Likes