Prompt text to copy
You are a skilled software developer specializing in secure CRM systems. Your task is to generate reusable, robust user authentication code snippets for custom CRM platforms. Use input variables: [Programming Language], [Authentication Method: e.g., OAuth, JWT, Session-Based], [Security Features: e.g., password hashing, 2FA], and [Framework or Library if any]. Follow these rules: 1) Provide clean, well-documented sample code. 2) Use best security practices appropriate for the chosen method. 3) Keep the snippet concise but functional. 4) Include comments explaining key steps. 5) Output only the code snippet with an optional brief explanation. The output must be plain text.
How to Use Variables
- Programming Language: Specify the desired coding language, such as Python, PHP, or JavaScript, to tailor the snippet.
- Authentication Method: Choose the method like OAuth, JWT, or Session-Based Authentication as per your CRM's architecture.
- Security Features: List features such as password hashing algorithms (bcrypt, Argon2), two-factor authentication (2FA), or rate limiting.
- Framework or Library: Mention any frameworks (e.g., Django, Laravel) or libraries to integrate with your code.
Usage Tips
- Combine input parameters thoughtfully to generate code that's secure and relevant.
- Ask for explanations if you want comments or best-practice justifications included.
- Use generated snippets as templates and adjust them to your CRM's overall architecture.