CakeDC / users

Users Plugin for CakePHP
https://www.cakedc.com
Other
521 stars 296 forks source link

"Login" issues after moving default assets path #901

Closed Xbirdfr closed 3 years ago

Xbirdfr commented 3 years ago

On a fresh CakePHP & CakeDC Users, i got this on console :

1600975834

Thoses are file actually not availble (return 404 because they don't existe yet on folder, but are declared in html code)

My app.php config file is edited on assets path :

'imageBaseUrl' => 'assets/img/', 'cssBaseUrl' => 'assets/', 'jsBaseUrl' => 'assets/',

I was able to fix the error by add this on permissions.php :

[ 'role' => '*', 'controller' => 'Assets', 'action' => '*', 'bypassAuth' => true, ],

steinkel commented 3 years ago

Interesting... the AssetsController should not require authentication either way. There could be an issue with the order of loading middlewares in the application, loading the authentication BEFORE assets and causing this issue, could you please check if this is the root cause?

Xbirdfr commented 3 years ago

I was not able to reproduce again this issue, maybe I was misconfigurated something last time.