•  
      Internship #422403 Implement Authentication and Role-Based Dashboards using Flask Blueprints
    #422403
    Arpita Gumma (arpita.gumma)
    2025-02-21 15:19
    2025-02-21 15:19
    Details
    Implement Authentication and Role-Based Dashboards using Flask Blueprints

    1 Project Setup

    • Set up a Flask project with a virtual environment.

    • Install necessary dependencies (Flask, Flask-Login, _ Flask-SQLAlchemy, etc.).

    2 Implement Authentication (auth.py)

    • Create user authentication system (login, logout, register).

    • Use Flask-Login for session management.

    • Store user details in a database with role-based access (admin or user).

    3 Define Admin Dashboard (admin.py)

    • Restrict access only to admin users.

    • Display admin-specific data.

    4 Define User Dashboard (user.py)

    • Restrict access only to regular users.

    • Display user-specific data.

    5 Apply Blueprint in app.py

    • Register admin, user, and auth blueprints in the main app.

    6 Protect Routes Using Authentication

    • Use @login_required for authentication.

    • Use role-based checks before rendering dashboards.

    Empty
    Empty
    State of Progress
    2025-02-19
    Empty
    2025-02-21
    Arpita Gumma (arpita.gumma)
    Ajit kumar (ajit)
    2025-02-21
    Closed
    Attachments
    Empty
    References
    References list is empty