Single login with Basic authentication
Posted: Tue Mar 22, 2022 6:36 pm
If you want to make Harald's integration with Basic authentication work, you need to change how Apache is configured. You can read more about that at https://stackoverflow.com/a/14809899/6660678 or https://httpd.apache.org/docs/trunk/mod ... gipassauth
Basically, you have to configure Apache to forward the PHP_AUTH_USER and PHP_AUTH_PW values to PHP. By default it doesn't do that to keep applications from tricking people into sharing their login information. That's why the compile-time setting is called SECURITY_HOLE_PASS_AUTHORIZATION.
Or if going through all that (rather finicky) configuration is too much work, you can just log in twice.
I describe the configuration as rather finicky because it keeps changing. CGIPassAuth is for Apache 2.4.13 and later. Older versions used SECURITY_HOLE_PASS_AUTHORIZATION or the mod_rewrite/SetEnvIf workarounds. So people report various things as working for them that don't work for other people.
The code to handle this in Phoenix is still there and was still working the last time I went through the steps to forward the relevant information.
Basically, you have to configure Apache to forward the PHP_AUTH_USER and PHP_AUTH_PW values to PHP. By default it doesn't do that to keep applications from tricking people into sharing their login information. That's why the compile-time setting is called SECURITY_HOLE_PASS_AUTHORIZATION.
Or if going through all that (rather finicky) configuration is too much work, you can just log in twice.
I describe the configuration as rather finicky because it keeps changing. CGIPassAuth is for Apache 2.4.13 and later. Older versions used SECURITY_HOLE_PASS_AUTHORIZATION or the mod_rewrite/SetEnvIf workarounds. So people report various things as working for them that don't work for other people.
The code to handle this in Phoenix is still there and was still working the last time I went through the steps to forward the relevant information.