Looking for guidance on implementing secure user authentication in Django for ERPNext custom apps, i

Hi everyone,

I am currently working on a custom app for ERPNext using the Django framework.

A custom app is an application built on top of ERPNext to add features or functionalities that are not available in the default system. For example, a company might want advanced employee attendance tracking or extra validation features which require a custom app.

I want to implement secure user authentication for different user roles and permissions.

I would like to know:

1. What are the best practices for handling authentication in Django for ERPNext custom apps?

2. Should I use Django’s built-in authentication system, or integrate a third-party package?

3. How can I ensure the security of sensitive user data while maintaining performance?

Any guidance, examples, or recommended resources will be greatly appreciated.

Thanks in advance!