# Facebook Login Error: CSRF detected

**URL:** https://meta.discourse.org/t/facebook-login-error-csrf-detected/112599
**Category:** Support
**Created:** [March 26, 2019, 12:43pm UTC](https://meta.discourse.org/t/facebook-login-error-csrf-detected/112599 "2019-03-26T12:43:14Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)
#### Post date: [July 23, 2019, 9:10pm UTC](https://meta.discourse.org/t/facebook-login-error-csrf-detected/112599/2 "2019-07-23T21:10:47Z")

</div>

This error is similar both for Google and Facebook. In my configuration there was a line in nginx:

```
# proxy_set_header X-Forwarded-Proto $https;

```

After I changed it to

```
proxy_set_header X-Forwarded-Proto $scheme;

```

the error has gone.

Solution was found after reading this topic: [Redirect URI mismatch in Google Auth](https://meta.discourse.org/t/redirect-uri-mismatch-in-google-auth/123152)

---

_[View the full topic](https://meta.discourse.org/t/facebook-login-error-csrf-detected/112599)._
