idurar-erp-crm icon indicating copy to clipboard operation
idurar-erp-crm copied to clipboard

User Authentication process

Open Ando22 opened this issue 1 year ago • 12 comments

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.

Ando22 avatar Sep 06 '23 05:09 Ando22

I'd like to work on this, can you assign me please? I'd like to know some additional info on this too

ShatilKhan avatar Sep 06 '23 09:09 ShatilKhan

I am interested in working on this as well.

Emyboy avatar Sep 06 '23 20:09 Emyboy

I want to work on this can you assign me please?

sahith29s avatar Sep 07 '23 04:09 sahith29s

Can you provide more info on this?

Sathyam1020 avatar Sep 07 '23 15:09 Sathyam1020

@Ando22 @salahlalami There are some questions can you please provide context about them so that can start with the implementation:

  • Do we have only 2 roles admin and staff
  • Can user creates custom roles of his choice
  • Can admin create user with role admin also
  • the set of permissions allowed in staff role are fixed? Or admin can edit that?

parteekcoder avatar Sep 09 '23 18:09 parteekcoder

@salahlalami @Ando22 can you please provide more context about this

parteekcoder avatar Sep 10 '23 16:09 parteekcoder

@Ando22 @salahlalami There are some questions can you please provide context about them so that can start with the implementation:

  • Do we have only 2 roles admin and staff
  • Can user creates custom roles of his choice
  • Can admin create user with role admin also
  • the set of permissions allowed in staff role are fixed? Or admin can edit that?
  1. Yes there are only 2 roles as an initial
  2. In future yes, but right now, everytime admin create a user, the role will assigned defaultly as staff. (we will create a new issue for handling RBAC). create roles it should be for admin
  3. Yes admin can create admin
  4. yes, it should be fixed as an initial feature

Ando22 avatar Sep 11 '23 11:09 Ando22

thanks, @Ando22 for providing this information, so means the number of roles and permissions assigned to roles should be dynamic (which means can be changed by the user)

parteekcoder avatar Sep 11 '23 11:09 parteekcoder

i want to contribute this issue. now is this problems is solved ?

sarath1326 avatar Mar 04 '24 07:03 sarath1326

i also need to contribute to the following issue can you provide more details

niket-malviya avatar Mar 07 '24 06:03 niket-malviya

you haven't provided any update about the problem can you please inform is the issue is still on or not

niket-malviya avatar Mar 29 '24 07:03 niket-malviya