deanc / silex-starter-pack

A starter pack for beginning development with the Silex PHP framework. Includes a basic admin control panel, and user login system.
12 stars 8 forks source link

Admin login not working out-of-the-box #4

Closed Steve-A-Orr closed 10 years ago

Steve-A-Orr commented 10 years ago

Since I am JUST starting my Silex/Symfony education, I just wanted to verify my conclusion--your starter pack, as written, is not supposed to successfully authenticate the admin login credentials found in config.php because the password ("foo") is hard-coded in app.php?

I attempt to visit "/a", am diverted to "/login" and get a "Bad credentials" message, despite them being exactly as entered in the config.php file. My poking around found no code, other than the SecurityServiceProvider chunk found in app.php, that seems to actually compare the form field value with the $app['login.password'] value (also found in app.php).

Just making a sanity check. Thanks for your attention.

deanc commented 10 years ago

Hi Steve,

Sorry for taking so long to reply. About 18 days ago there was a big update to the starter pack which kinda cleaned up the admin stuff. Now the $app['login.*'] stuff is gone and you simply have to generate a password hash using the command line task, and then set that as a constant in app/config.php. Instructions for this are now in the README.md

Let me know if you have any more questions, but this should resolve your issue.