This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
AbstractLoginFormAuthenticator::supports() always returns false if application lives under a directory #44318
Labels
You can continue the conversation there. Go to discussion →
Symfony version(s) affected
5.4.0
Description
Say you have an application deployed to
https://somedomain.com/my/path
, as opposed to justhttps://somedomain.com/
.I think you usually call that an application that "lives under a subdirectory" (or directory, or folder).
I expect EVERYTHING in the framework to work out of the box with ZERO configuration in that scenario. Generally, Symfony does know how to handle that.
Out-of-the-box login authentication however seems to be one of those things that do not work as expected in the under-a-directory scenario.
I think that's due to the
AbstractLoginFormAuthenticator::supports()
method whose current implementation is:In this scenario,
$this->getLoginUrl($request)
returns/my/path/login
, while$request->getPathInfo()
returns just/login
when the url being requested is/my/path/info
.How to reproduce
Deploy a Symfony application under a directory.
Make a
LoginFormAuthenticator
withmake:auth
Try to log in.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: