PatrickLouys / no-framework-tutorial

A small tutorial to show how to create a PHP application without a framework.
MIT License
1.53k stars 188 forks source link

Login chapters #24

Closed ralt closed 6 years ago

ralt commented 9 years ago

Hi,

It'd be pretty good to have a "Login" chapter.

A simple login form (I'm thinking that introducing assets management is a thing too, but for another issue) that lets a user login. Also, a register form. And a logout link.

A database chapter and a session chapter need to be introduced before though.

The backend of the login would simply be a table and using password_hash/password_verify.

After that, the backend of the login could be switched to OAuth. This way, you show the "replace implementations", through an Authenticator interface.

Cheers,

HassanAlthaf commented 9 years ago

Agreed, I would also like to see a lot of security measures added to it.

michaelGregoire commented 9 years ago

Simply the best tutorial that I've come across, thus far, that's really made clear the idea of dependency injection and loose coupling. Thank you for it! There are simply not enough tutorials/books about modern php development that aren't tied to a particular framework.

I look forward to more chapters. Especially covering an example of authentication and authorization.

HassanAlthaf commented 9 years ago

@michaelGregoire and of course validation. Like how the hell can we send validation messages to the template file..?

PatrickLouys commented 6 years ago

I covered all those issues my book. Thanks for the feedback :)