Cakephp 3 ajax session timout and AuthComponent ajaxLogin?

Hello,

Can you explain how the parameter ‘ajaxLogin’ component of AuthComponent.
I filled in with the name of a view content in Templates / Elements, but that does not take into account.
I still have this error 403. This causes me problem in ajax calls my application.

Can you help me ?

In Cake documentation :
http://book.cakephp.org/3.0/en/controllers/components/authentication.html#configuration-options

But no exemple for use .

My configuration :
> $this->loadComponent(‘Auth’, [
> ‘authenticate’ => [
> ‘Form’ => [
> ‘fields’ => [
> ‘username’ => ‘login’,
> ‘password’ => ‘password’
> ]
> ]
> ],
> ‘loginAction’ => [
> ‘controller’ => ‘Users’,
> ‘action’ => ‘login’
> ],
> ‘loginRedirect’ => [
> ‘controller’ => ‘Pages’,
> ‘action’ => ‘home’
> ],
> ‘logoutRedirect’ => [
> ‘controller’ => ‘Users’,
> ‘action’ => ‘login’
> ],
> ‘ajaxLogin’ => ‘ajax_error_auth’ // ?? no used when lost session in ajax
> ]);

Any idea?
Thanks

Hello,

Nobody used this parameter “ajax Login” of AuthComponent?
can you help me or gives me an idea for its use?

Thank’s

As far as I understand, the 403 error code will always be fired, even if you set this option - it’s just that a different view should be shown.

I think it may be better to use the jquery-ajax error method (if you use jquery) to really control what should happen in this case.