idurar/idurar-erp-crm

User Authentication process

Open

#457 opened on Sep 6, 2023

View on GitHub
 (14 comments) (0 reactions) (1 assignee)JavaScript (4,308 stars) (1,036 forks)batch import
good first issue🔧 Backend

Description

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.

Contributor guide