# Enabling require authentication to read content causes stall

**URL:** https://meta.discourse.org/t/enabling-require-authentication-to-read-content-causes-stall/49015
**Category:** Bug
**Created:** [2016年八月22日 16:15 UTC](https://meta.discourse.org/t/enabling-require-authentication-to-read-content-causes-stall/49015 "2016-08-22T16:15:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### Post date: [2016年八月22日 16:15 UTC](https://meta.discourse.org/t/enabling-require-authentication-to-read-content-causes-stall/49015/1 "2016-08-22T16:15:38Z")

</div>

If setting:

`Require authentication to read content on this site, disallow anonymous access.`

is enabled while a site visitor is browsing and the the visitor navigates away from the current page (refreshes or clicks link) the the site will not re-direct back to login / home screen. See screenshots below:

 ![](https://global.discourse-cdn.com/meta/original/3X/c/a/caa84a991f466ab1ad3a0842cf2e2e8932f9d848.png)

* * *

 ![](https://global.discourse-cdn.com/meta/original/3X/4/7/47492888ee001ef65600f71610eeef8ac0d8ed53.png)

* * *

 ![](https://global.discourse-cdn.com/meta/original/3X/5/6/56d80ae19a3463bbb187de868326d6d374485b05.png)

* * *

 ![](https://global.discourse-cdn.com/meta/original/3X/6/0/608308176a40930114b6a7e20130728aff464290.png)

* * *

- Should there be a re-direct back to login page if admin enforces authentication requirement whilst non-authenticated visitors are on site ?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2016年八月22日 18:08 UTC](https://meta.discourse.org/t/enabling-require-authentication-to-read-content-causes-stall/49015/2 "2016-08-22T18:08:18Z")

</div>

I’ve fixed this by forcing users to refresh when that setting is changed:

[https://github.com/discourse/discourse/commit/c297af8ba1c7e2b1cf810ddfecea1cfb35368401](https://github.com/discourse/discourse/commit/c297af8ba1c7e2b1cf810ddfecea1cfb35368401)

They should be redirected to the appropriate page if this setting is changed while they are browsing.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2016年八月22日 18:08 UTC](https://meta.discourse.org/t/enabling-require-authentication-to-read-content-causes-stall/49015/3 "2016-08-22T18:08:21Z")

</div>


