DEV Community

loading...

Discussion on: Basic Dancer2 Authentication

Collapse
bigpresh profile image
David Precious

Authentication is one of those things it's important to get right, and avoiding re-inventing the wheel is a good way to avoid common mistakes.

It would be well worth mentioning modules like Dancer2::Plugin::Auth::Extensible which will handle all the basic stuff for you, in a battle-tested way.

In particular, your hand-rolled version in this post makes no attempt to remember that you logged in or show how to protect access to any other routes in the app.

Collapse
akuks profile image
Ashutosh Author

Thanks David. This article is just to understand how the authentication works in Dancer2. My next article is on the Dancer2 Authentication using MySQL (as database), where your mentioned plugin Dancer2::Plugin::Auth::Extensible is in use and, for encryption Crypt::PBKDF2 and the DBIX for querying database.