idurar/idurar-erp-crm

User Authentication process

Open

#457 建立於 2023年9月6日

在 GitHub 查看
 (14 留言) (0 反應) (1 負責人)JavaScript (4,308 star) (1,036 fork)batch import
good first issue🔧 Backend

描述

The objective of this feature is to enhance the existing user authentication process in our application. This includes implementing user registration, login, and logout functionalities with a primary focus on the backend. Additionally, we aim to incorporate user role-based permissions and ensure the seamless sharing of context with the controller.

Tasks:

  1. User Registration: Create registration API endpoints. Implement validation for user registration data. Store user registration data securely in the database. (As default, the first user registration role will be as admin)

  2. User Login: Develop login API endpoints. Implement user authentication during login. Generate and manage user sessions.

  3. User Logout: Create a logout API endpoint. Ensure proper session termination and security measures. Role-based Permissions:

  4. Define user roles: Implement role-based authorization logic. Restrict access to certain functionalities based on user roles. roles: ["admin", "staff"]

  5. Sharing Context with Controller Design an effective mechanism for sharing user context with the controller. Ensure that the controller can access relevant user data as needed.

貢獻者指南