# Invalid nonce error

**URL:** https://meta.discourse.org/t/invalid-nonce-error/83264
**Category:** SSO
**Created:** [March 19, 2018, 12:56am UTC](https://meta.discourse.org/t/invalid-nonce-error/83264 "2018-03-19T00:56:44Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![shahidmir](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@shahidmir](https://meta.discourse.org/u/shahidmir)
#### Post date: [March 19, 2018, 10:08am UTC](https://meta.discourse.org/t/invalid-nonce-error/83264/3 "2018-03-19T10:08:52Z")

</div>

Hi

thanks very much for your reply.  
I have just come across the following article and not sure if this is supposed to solve this same issue? Does this make any sense to you?

> [@Synchronize SSO login state between Discourse and provider](https://meta.discourse.org/t/sso-synced-login-state-tips/60464):
>
> I’m currently working on a website + [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) integration, the website is SSO provider. I’ve noticed a few tricky things and would like to document it down. Many of the information are from meta itself but are scattered in a few posts. I think it is better to have a single point of summary. [The official SSO document](https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045) already provides detail of how to setup Discourse to integrate with external SSO provider. That one should be read very carefully. Here I’m focusing on how to made the login/lo…

# Synchronize state from website to Discourse.

## Login

When a user is logged in on the website, the URL that link to the forum site should be set to `fourm.example.com/session/sso` . Then when a user click this URL to visit forum, he will be logged in to Discourse automatically.

If your site allows anonymous browsing, make sure you detect the user login state and only append the `/session/sso` part for logged in user. For anonymouse user just direct them to `forum.example.com/`

Without this setup, when a user navigates to Discourse, he will need to click the Discourse login button to login.

---

_[View the full topic](https://meta.discourse.org/t/invalid-nonce-error/83264)._
