I’ve run into a similar issue on another site. In that case, the problem seems to be caused by Object Caching for anonymous users.
As a temporary fix, could you try updating the wp-discourse plugin to version 1.8.0 (it’s in the WordPress repo now) and then adding the following code to your theme’s functions.php
file?
add_filter('wpdc_sso_client_query', 'wpdc_custom_sso_client_query' );
function wpdc_custom_sso_client_query() {
return wp_generate_password( 12, false );
}
All the code is doing is generating a unique string for the login link to break the object cache. Calling wp_generate_password
is a simple way to do this. This should work as long as the Login With Discourse link is on a page that is not cached.
Let me know if you have any trouble adding the code to your theme. And also, if this fixes the issue for you. I’ll work on creating a better fix for the problem over the next week.