# Users plugin caught in an endless redirect

**URL:** <https://discourse.cakephp.org/t/users-plugin-caught-in-an-endless-redirect/2892>\
**Category:** Need Help\
**Created:** [July 16, 2017, 8:16pm UTC](https://discourse.cakephp.org/t/users-plugin-caught-in-an-endless-redirect/2892 "2017-07-16T20:16:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpforte](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/jpforte/32/716_2.png) [@jpforte](https://discourse.cakephp.org/u/jpforte)\
**Post date:** [July 16, 2017, 8:16pm UTC](https://discourse.cakephp.org/t/users-plugin-caught-in-an-endless-redirect/2892/1 "2017-07-16T20:16:12Z")

</div>

Hi, I have the cakedc/users which was working but after baking my first table there is an endless redirect loop occurring. Fails with “too many redirects”

If I comment out the config/bootstrap.php line with ‘Plugin::load(‘CakeDC/Users’, [‘routes’ =\> true, ‘bootstrap’ =\> true]);’ It stops the redirect but also does not authenticate.

I have adminLTE theme installed as well.

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [July 17, 2017, 10:41am UTC](https://discourse.cakephp.org/t/users-plugin-caught-in-an-endless-redirect/2892/2 "2017-07-17T10:41:30Z")

</div>

I had a similar problem because of this: [https://github.com/CakeDC/users/issues/549](https://github.com/CakeDC/users/issues/549)

---

<div class="post-metadata">

**Author:** ![jpforte](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/jpforte/32/716_2.png) [@jpforte](https://discourse.cakephp.org/u/jpforte)\
**Post date:** [July 17, 2017, 2:26pm UTC](https://discourse.cakephp.org/t/users-plugin-caught-in-an-endless-redirect/2892/3 "2017-07-17T14:26:38Z")

</div>

Thanks. I can’t find any documentation that tells how to create the config/permissions.php file. I can find references to it but it assumes a vast amount of familiarity.

Correction: I did figure out by finding other files named permissions.php and reading the information there. Should that not be part of the installation? From the root directory of the app

> cp vendors/cakedc/auth/config/permissions.php config/  
> vim config/permissions #add the line above to the return array.

My problem now is that the authentication does not work, I can reset the password then back to login screen. I can create a new user at the command line and that works? try [http://minivacs.magna.net](http://minivacs.magna.net) its just a test/learning space.

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [July 17, 2017, 3:16pm UTC](https://discourse.cakephp.org/t/users-plugin-caught-in-an-endless-redirect/2892/4 "2017-07-17T15:16:13Z")

</div>

here is an example permissions file: [https://github.com/rrd108/bhaktanyilvantartas/blob/master/config/permissions.php](https://github.com/rrd108/bhaktanyilvantartas/blob/master/config/permissions.php)
