# Social Login only works on desktop, but not on mobile devices (CSRF detected)

**URL:** <https://meta.discourse.org/t/social-login-funktioniert-nur-auf-desktop-aber-nicht-auf-mobilen-geraten-csrf-detected/389975>\
**Category:** SSO\
**Tags:** mobile, oauth2, linkedin-oauth, google-login, login\
**Created:** [November 30, 2025, 3:34pm UTC](https://meta.discourse.org/t/social-login-funktioniert-nur-auf-desktop-aber-nicht-auf-mobilen-geraten-csrf-detected/389975 "2025-11-30T15:34:44Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![DW\_dev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dw_dev/32/490888_2.png) [@DW\_dev](https://meta.discourse.org/u/DW_dev)\
**Post date:** [November 30, 2025, 3:34pm UTC](https://meta.discourse.org/t/social-login-funktioniert-nur-auf-desktop-aber-nicht-auf-mobilen-geraten-csrf-detected/389975/1 "2025-11-30T15:34:44Z")

</div>

Hello,  
my Discourse forum has a problem with social logins (Google, Discord, LinkedIn):

- **On desktop, all social logins work perfectly.**

- **On all mobile devices (iOS/Android, Safari/Chrome/Firefox), they fail.**

The mobile process:

1. Social login opens normally.

2. After the redirect back to my site, I only land **on the homepage** , but **I am not logged in**.

In the logs, every time it says:

```plaintext
(google_oauth2) Authentication failure! csrf_detected

```

or

```plaintext
(discord) Authentication failure! invalid_credentials: invalid_request

```

**What I have already checked:**

- OAuth setup correct (desktop works)

- Cookies/cache deleted on devices

- No in-app browsers, real browsers tested

- No matter which mobile browser → always CSRF detected

**Question:**  
What in Discourse can cause social logins to **only lose the session/cookies on mobile devices** and fail with `csrf_detected`?

Thanks for any help! 🙏

* * *

---

_[View the full topic](https://meta.discourse.org/t/social-login-funktioniert-nur-auf-desktop-aber-nicht-auf-mobilen-geraten-csrf-detected/389975)._
