# Plugin authentication

**URL:** <https://discourse.cakephp.org/t/plugin-authentication/4026>\
**Category:** Plugins\
**Created:** [March 8, 2018, 4:52pm UTC](https://discourse.cakephp.org/t/plugin-authentication/4026 "2018-03-08T16:52:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![j-bone](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@j-bone](https://discourse.cakephp.org/u/j-bone)\
**Post date:** [March 8, 2018, 4:52pm UTC](https://discourse.cakephp.org/t/plugin-authentication/4026/1 "2018-03-08T16:52:58Z")

</div>

I have several plugins that perform admin functions. One plugin has an admin prefix. I built out the framework of the application first, then rolled in authentication.

For some reason, when I click on a link to an admin portion of the plugin, i get the following error:

Error: A route matching “array ( ‘controller’ =\> ‘Users’, ‘action’ =\> ‘login’, ‘plugin’ =\> NULL, ‘prefix’ =\> ‘admin’, ‘\_ext’ =\> NULL, )” could not be found.

The other plugins don’t flag this error.

The passed context is:

[  
’\_base’ =\> ‘/ccdl’,  
’\_port’ =\> null,  
’\_scheme’ =\> ‘http’,  
’\_host’ =\> ‘localhost’,  
‘params’ =\> [  
‘controller’ =\> ‘ProductCategories’,  
‘pass’ =\> [],  
‘action’ =\> ‘index’,  
‘prefix’ =\> ‘admin’,  
‘plugin’ =\> ‘Products’,  
’\_matchedRoute’ =\> ‘/products/admin/:controller’,  
’\_ext’ =\> null,  
‘isAjax’ =\> false  
]  
]

I don’t know why I’m getting that error for the plugin which contains prefix routing.
