Battle tested authentication middleware for web app

I am using Slim 3 as a backend to a web app and am relatively new to Slim. What is the best authentication middleware that I should use to have the app users login and be authenticated? Not rocket science to write myself but I prefer to use some already battle tested middleware to get the most secure solution.

Thanks!

I’m not aware of any user/pw based auth middleware for Slim that is released as an open project. You can find a big list of PSR-7 middleware here, but I don’t see any for the type of auth system I think you’re looking for. For an example using HTTP Basic Auth, check out tuupola/slim-basic-auth and for a JWT example have a look at tuupola/slim-jwt-auth. Those might give you some ideas.

Thanks. Will do something that fits my project, with inspirations from the links you sent.