We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

I there a standard User Authentication middleware in Phalcon that I can safely re-use ?

I am new to Phalcon so apologies if this is stupid...

I am trying to implement Basic Auth for all routes that begin with /api. Am I correct to say that there is no such thing in Phalcon ?

I went through the tutorials (and especially the Vokuro example) and it looks like I need to re-write manually the User model, the Auth validation rules, and all the Session management stuff.

I am coming from Laravel, where there is standard middleware that does the job automatically for me. I am not trying to compare one framework with another, just trying to understand the fastest way to get up and running.

Thanks for your help.

unfortunately phalcon is lacking such things. Modifying Vokuro will be your best bet



17.5k

You need to build your own authentication, but it's pretty simple. You can copy mine if you want: https://github.com/zhegwood/phalcon.angular.bootstrap