# Issue: CSRF Detected Error with OAuth2 Login using oauth2-basic Plugin

**URL:** https://meta.discourse.org/t/issue-csrf-detected-error-with-oauth2-login-using-oauth2-basic-plugin/331505
**Category:** SSO
**Tags:** oauth2
**Created:** [October 18, 2024, 10:05am UTC](https://meta.discourse.org/t/issue-csrf-detected-error-with-oauth2-login-using-oauth2-basic-plugin/331505 "2024-10-18T10:05:40Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [October 18, 2024, 8:51pm UTC](https://meta.discourse.org/t/issue-csrf-detected-error-with-oauth2-login-using-oauth2-basic-plugin/331505/2 "2024-10-18T20:51:45Z")

</div>

We frequently [see this error](https://meta.discourse.org/t/troubleshooting-bad-csrf-error-on-initial-site-setup/97059) when there’s a mismatch between what the browser is using and what the backend is expecting.

Can you try turning on `force_https` and see if that fixes the problem?

If not, what’s your request path?

---

_[View the full topic](https://meta.discourse.org/t/issue-csrf-detected-error-with-oauth2-login-using-oauth2-basic-plugin/331505)._
