Sporadic issue wp-discourse/SSO: Nonce has already expired

Hi @simon. I’ve been digging into this issue recently because it’s happening a lot on one of our sites. (It’s not related to what @jesselperry mentioned but thank you, @jesselperry, for the advice!)

I put a bunch of debugging statements into /wp-discourse/lib/sso-provider/discourse.php and it looks like at the point where it does $response = wp_remote_post(...... an error comes back that says:
cURL error 28: Operation timed out after 5001 milliseconds with 0 bytes received

So for kicks, I bumped up the time that WordPress will wait for a cURL response all the way up to 25 seconds, and the same thing happened except it said:
cURL error 28: Operation timed out after 25001 milliseconds with 0 bytes received

Does it seem like Discourse is legitimately taking a really long time and WordPress is giving up waiting or could it something else?

(I also checked all the arguments to wp_remote_post and they look normal to me.)

Thanks if you have any ideas! :slight_smile: