In this WordPress forum thread titled ‘Wordpress as sso client Expired Nonce’, maia_internet reports an issue where users attempting to log in via Discourse SSO receive an ‘Expired nonce’ error, despite successful user creation. The setup involves WordPress at https://aircadetcentral.net and Discourse at https://forum.aircadetcentral.net, both on separate IPs, using WP-Discourse plugin v1.3.5. simon confirms the issue but can’t reproduce it locally, questioning if multisite remnants or .htaccess rules are involved — maia_internet confirms a clean single-site reinstall and standard .htaccess. simon probes further, noting the user’s Discourse account syncs but lacks a set Discourse username — maia_internet confirms it’s blank. simon observes password reset works but links trigger ‘connection refused’, possibly firewall-related. maia_internet tests firewall rules but still gets ‘Expired nonce’. iamntz identifies the root cause: MariaDB 5.5.46 doesn’t support CURRENT_TIMESTAMP as a default for the nonce table, causing it to fail creation — logs confirm wp_discourse_nonce table doesn’t exist. maia_internet confirms running MariaDB 5.5.46; iamntz explains MariaDB 5.5.x mirrors MySQL 5.5.x, requiring upgrade to at least 5.6.5 or MariaDB 10.0. maia_internet upgrades to MariaDB 10.0 — problem resolved with no further config needed. The thread ends with gratitude to the community for the solution.
I’m trying to configure my wordpress to be a sso client to my discourse.
Everything seems to be configured as the howto states but when I try to ‘login with discourse’, if the user doesn’t exist it gets created, and it returns failed login ‘Expired nonce’
thanks @simon I must admit that’s 1 file i’ve not checked yet!
I completely deleted the multisite install, and installed a fresh single site WP. I’ll see if there are any traces of the multi install in the .htaccess.
Thanks! That gives some idea of where the error is happening.
I went through the password reset process and can now access my account on your WordPress site. When I click on the WordPress password reset email that you site is sending out, I get a ‘connection refused’ error and can only access the site by enabling a VPN. Possibly that has something to do with the problem.
tried to bypass the firewall settings and whilst it did kick in, i reset the rules and still got an Expired Nonce whilst trying to connect to Discourse.
The password reset was successful but the link to discourse returned the same with nothing showing up in the iptables output, so the IPs weren’t getting blocked.
The problem seems to be that CURRENT_TIMESTAMP isn’t a valid default value for mysql < 5.6.5, hence the nonce table can’t be created (if you looks into logs, you’ll find „invalid value for added_on…).
Yup, need to upgrade. Probably there is a way of making this backwards compatible, but considering that 5.6 was released in 2012 i think this would be kind of useless.