# SSO discourse have error at same session

**URL:** https://meta.discourse.org/t/sso-discourse-have-error-at-same-session/165457
**Category:** WordPress
**Created:** [September 26, 2020, 1:53pm UTC](https://meta.discourse.org/t/sso-discourse-have-error-at-same-session/165457 "2020-09-26T13:53:01Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [September 26, 2020, 5:24pm UTC](https://meta.discourse.org/t/sso-discourse-have-error-at-same-session/165457/2 "2020-09-26T17:24:53Z")

</div>

> [@cmdntd](#):
>
> First it’s work smoothly
> 
> But when I’m in the same session (not log out), and try to go to link admin /wp-admin/, it does not redirect me to dashboard, and show this error in login form:
> 
> > Expired Nonce

I think the problem you are having is caused by object caching on your server. Try adding something like the following code to your WordPress theme’s `functions.php` file to see if that solves the problem:

```php
add_filter('wpdc_sso_client_query', 'wpdc_custom_sso_client_query' );
function wpdc_custom_sso_client_query() {
    return wp_generate_password( 12, false );
}

```

There are some details about this here: [Wordpress SSO Expired nonce - #15 by simon](https://meta.discourse.org/t/wordpress-sso-expired-nonce/105159/15).

---

_[View the full topic](https://meta.discourse.org/t/sso-discourse-have-error-at-same-session/165457)._
