# Wordpress SSO: Verfallener Nonce

**URL:** https://meta.discourse.org/t/wordpress-sso-expired-nonce/105159
**Category:** WordPress
**Created:** [27. Dezember 2018 um 18:02 UTC](https://meta.discourse.org/t/wordpress-sso-expired-nonce/105159 "2018-12-27T18:02:45Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2. Januar 2019 um 21:44 UTC](https://meta.discourse.org/t/wordpress-sso-expired-nonce/105159/15 "2019-01-02T21:44:36Z")

</div>

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?

```php
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.

---

_[View the full topic](https://meta.discourse.org/t/wordpress-sso-expired-nonce/105159)._
