Closed omgslinux closed 1 year ago
I'll try to be more specific. The problem is for using a custom query for login, as explained for symfony3 and for later versions. I have debugged that always that I enter a valid user, the query returns the record. In the query, when the domain_id field is 0, it works perfectly, but any other domain_id fails by redirecting to the login screen, with no visible error. If I force a wrong password, the "invalid user or password" is visible in the login screen.
Additional info: I've tested in a local box by setting both nginx and apache (in different ports, of course) pointing to the same document root and both using the same php (i.e, fastcgi), so I can try both web servers. The result is that if I set APP_ENV to "dev", everything works, including the bottom bar. If I set APP_ENV to "prod", then in both cases I get exactly the same result, and the same behaviour explained previously. Finally, in "dev", in the "/" path where the redirect goes after login, I've dumped "$this->getUser()", and where in "dev" the login shows a user entity, in "prod", the same user with domain id !=0 shows null, and any user with domain_id == 0 works.
Closed in commit 18fb0d7
In symfony5 branch, unlike the head branch, In production mode and with nginx, I can't login with any user that is not in the @default domain (id 0). There's a kind of successful login, with no error message. If I force a wrong login, I get "Invalid credentials" on screen. I've tried this first in one server and to get rid on anything related to the server itself, I've been able to deploy the app on a server where the main branch was running, but in a different directory, so both versions are available. After upgrading to php7.4, I've tested the main branch with symfony3 and works perfectly. Then, I copy the nginx config and change the "app.php" references to point to "index.php", and set the root to the public dir instead to the "old" web dir. I enable this config and have exactly the same result than in the other server, i.e, I can login with any user of the @default domain, but not with any other user in other domain. I've tested this local dev environment (with symfony built-in webserver) and everything works perfectly with any user.
When this is solved, I'll move this branch to be the main.