Assume I'm in an admin\controller\action...
When a session times out and the user's next request to any controller/action is placed, I end up in my admin\users\login() function. Which is exactly what should happen based on the Auth component settings!
But, then a redirect to ['admin' => false, 'controller' => 'users', 'action' => 'login'] immediately comes back to the "admin\users\login"
The code:
$this->redirect(['admin' => false, 'controller' => 'users', 'action' => 'login'])
does NOT honor the admin=false at this point.
Actually, looking at my 'Auth' component initialization in AppController:
// Authentication
$this->loadComponent('Auth', [
'authorize' => array('Controller'),
'loginAction' => array('admin' => false, 'plugin' => NULL, 'controller' => 'users', 'action' => 'login'),
'loginRedirect' => array('admin' => false, 'plugin' => NULL, 'controller' => 'pages', 'action' => '/'),
'logoutRedirect' => array('admin' => false, 'plugin' => NULL, 'controller' => 'users', 'action' => 'login'),
'authError' => 'Authorization is Required!',
'authenticate' => [
'Form' => ['fields' => ['username' => 'name', 'password' => '
'passwordHasher' => 'Default'
]
]
]);
It looks to me as if the admin => false is being ignored. I'm sure that when the delayed (went for coffee) new request for some controller/action occurs that the request would be sent to the admin\users\login since the last one was an admin... but why shouldn't the actual redirect inside the admin\users\login or the Auth->loginRedirect shown here still enforce the admin route?
Is there something new in 3.0, or am I just missing something?