SSO Integration Issue - Need Help with Automatic Authentication

AI-generated summary

Omri from Hailo is seeking help with an SSO integration issue between their Developer Zone and a community platform using BBPress. Despite successful SSO implementation, users must still go through an explicit authentication flow, even when already logged into the Developer Zone. They aim for seamless automatic login without redirects. Angus responds, explaining that DiscourseConnect can achieve this via the auth immediately site setting, which automatically redirects to the external login system when login_required is true and only one external authentication method is configured. He suggests linking directly to the DiscourseConnect authentication endpoint from WordPress for automatic login, referencing a relevant Discourse meta discussion here.

Hello Community,

I’m seeking assistance with an SSO integration challenge. We have successfully implemented SSO between our Developer Zone and the community platform, but we’re facing a specific issue:

Currently, even when users are already logged into our Developer Zone (our SSO provider), they still need to go through an explicit authentication flow when accessing the community platform. This requires the user to be redirected to the Developer Zone and then back to the community.

What we’re aiming for is a seamless experience where users already authenticated in the Developer Zone can navigate directly to the community and be automatically signed in without additional redirects.

We’ve implemented BBpress and the basic sign-in functionality works, but this automatic authentication piece is not working as expected.

Has anyone successfully implemented this type of seamless SSO flow? Any code examples, configuration suggestions, or documentation would be greatly appreciated.

Thank you!

Omri Azim
Application Engineer - Community Manager
Hailo

Hello Hailo,

What you’re describing is how DiscourseConnect is intended to work.

On the Discourse side of things there is an auth immediately site setting that, as the setting name implies, immediately initiates the authentication flow. However, as the setting description notes:

Automatically redirect to the external login system without user interaction. This only takes effect when login_required is true, and there is only one external authentication method

Assuming your site is not login required what you can do is link directly to the DiscourseConnect authentication endpoint from Wordpress, rather than the base Discourse domain. See further: