Issue with login syncing between Discourse and WordPress


I do encounter an issue with Discourse and WordPress. WordPress is set as master, and Discourse as a slave. User syncing is working properly the same goes for comment syncing.

However, if a user login to WordPress (using the default wp-login.php), it does not automatically log in to the user on Discourse. The user should press ‘login’ on Discourse again to be logged in.

Is someone able to assist me here, please?

Thanks in advance.

Any help please?

I am unable to solve this problem. :frowning:

Hey @Festinger

I’m assuming you mean that their login process started in Wordpress. And that when they go to Discourse and click “login” they don’t have to enter their login details in Wordpress again. If so, what you’re describing is the expected behaviour. Logging directly into Wordpress (without first going to Discourse) does not automatically log you into Discourse in the background. The login process has to be initiated from Discourse to log into Discourse.

This is how most identity systems work, i.e. they don’t share “sessions” between different services in the system. I understand that with some identity systems like Google’s, you’ll log into say Google Analytics, and then when you go to Gmail you’ll still be logged in. But that kind of cross domain session experience needs to be maintained by the system provider (i.e. Google) and is not built in to standard identity protocols used on platforms like Discourse and Wordpress.

Discourse and Wordpress are different open source systems maintained by different people. The WP Discourse plugin makes it possible to handle login between the two, but it won’t ever be a complete identity and session solution analagous to what companies like Google do across their different services.

My advice would be to not spend time spend time trying to recreate what Google and similar services do with their cross-domain session experience. I know many community admins would like that (I’ve been asked to do it several times), however your users will care alot less about this than you think.


Thank you very much! That makes sense :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.