ivanchenoweth / poc-dashboard-iot

Probe of concept of simple admin iot dashboards
1 stars 0 forks source link

Login Process #4

Open ivanchenoweth opened 2 years ago

ivanchenoweth commented 2 years ago

Make a login process (database match) and redirecting to the properly dashboard roles

We need to make a process after the login button when a valid username and password in the login screen submit button, in order to to proccess checking the match in the database, getting the role, and redirect to the: admin dashboard, user dashboard, login screen (if password or user not valid).

The dashboards could be a blank page, and have to be protected to be access from other roles.

Acceptance criteria (AC)

  1. We need process the username and password when the login screen button is submitted.
  2. We need validate the username and password in a database to get the Role (user or admin)
  3. We need to redirect to the admin endpoint (blank admin dashboard) if the role is admin
  4. We need to redirect to the process endpoint (blank user dashboard) if the role is user
  5. We need to redirect to the login page agin if the user/password not found
  6. We need to protect the admin and user endpoint against other role access

BDD :

DOR:

Mockup: Login