# Soft Login Required

**URL:** https://meta.discourse.org/t/soft-login-required/408140
**Category:** Theme component
**Tags:** login
**Created:** [July 21, 2026, 1:07pm UTC](https://meta.discourse.org/t/soft-login-required/408140 "2026-07-21T13:07:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [July 21, 2026, 1:07pm UTC](https://meta.discourse.org/t/soft-login-required/408140/1 "2026-07-21T13:07:59Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Creating a flexible Soft Gate for your community |
| 🛠 | **Repository** | [GitHub - VaperinaDEV/soft-login-required: Creating a flexible Soft Gate for your community · GitHub](https://github.com/VaperinaDEV/soft-login-required) |
| ❤ | **Found it useful?** | [\> ./support --coffee](https://meta.discourse.org/u/don) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

 ![Soft Login Required](https://global.discourse-cdn.com/meta/original/4X/6/1/5/615d3c76cb069f5c410a8681b75649f6948caa4e.png)

👋

### 💡 What does this component do?

By default, Discourse gives you two main options: leave your site open to everyone, or lock it down completely using the `login required` site setting.

**Soft Login Required** bridges this _gap_ by creating a flexible **Soft Gate** for your community:

🚪 **Redirection:** Redirects anonymous visitors to `/login`. When they try to access topics it will redirect to `/login` (with a `returnPath` parameter).

📇 **Topic Preview Card on Login Page:** When redirected from a topic, a custom preview card is rendered directly on the `/login` page, showing guests a teaser/context of the topic they are about to unlock!

🔎 **SEO & Crawler Friendly:** Search engine bots (Googlebot, Bingbot, etc.) bypass the frontend redirect entirely via Discourse’s native crawler detection, keeping your SEO rankings safe.

🚫 **Route Exclusion Rules:** Easily exclude specific paths or URL patterns with `disabled_url` setting using wildcards (e.g., `/c/*` or `/about`).

* * *

### 📸 How it works (User Flow)

Guest visits topic ➡ Redirected to `/login` ➡ **Sees Topic Preview Card on Login Page** ➡ Logs in ➡ Returned to exact topic URL

* * *

### ⚠ Important: Design Philosophy (Soft Login Required vs. Login Required)

> **Note on Security vs. UX:**  
> This component acts as a **Soft Login Gate** designed for **UX-level login prompts, age-verification compliance or community nudging** while fully preserving SEO rankings.
> 
> Because Discourse core serves topic content to search crawlers for indexing, raw HTML/JSON remains accessible to non-JS clients by design. **If your use case requires strict, server-side content isolation, please use Discourse’s built-in private categories or `login required` site setting instead.**

* * *

**Context** : [How I Revamped Our Forum's Visitor Flow](https://meta.discourse.org/t/how-i-revamped-our-forums-visitor-flow/408029)
