Hello everyone
I installed the authentication plugin
this is my code
$service->setConfig([
'unauthenticatedRedirect' => Router::url([
'plugin' => null,
'controller' => 'Users',
'action' => 'login',
'prefix' => 'Auth',
]),
'queryParam' => 'redirect',
]);
$service->loadAuthenticator('Authentication.Form', [
'fields' => $fields,
'loginUrl' => Router::url([
'prefix' => 'Auth',
'plugin' => null,
'controller' => 'Users',
'action' => 'login'
]),
]);
if I call a url that starts with the Auth prefix it works fine but if I call a url that starts with another prefix I get this error
A route matching "array (
'controller' => 'Users',
'action' => 'login',
'prefix' => 'Forums',
'plugin' => NULL,
'_ext' => NULL,
)" could not be found.
thanks for help