cloudstack-ui icon indicating copy to clipboard operation
cloudstack-ui copied to clipboard

Add ngrx dependency and rewrite authentication to use ngrx store

Open zolotyx opened this issue 6 years ago • 2 comments

  1. Please move authentication code to Auth module
  • Add required selectors/reducers/effects
  • Change the way UI handles login/logout actions
  1. This issue covers the following requirements: [REQ_GEN_002] A user should be able to view brief information about his profile in the main menu.

Connected to #1225

Mockup 2018-11-09 15 07 24

zolotyx avatar Aug 14 '17 02:08 zolotyx

My previous code for this issue (work not done). Click What I was trying to do:

  • Rewrite new components for login with the store.
  • Add global auth store that keeps only some login data (not all).
  • Add auth page store to keep auth page state.
  • Get current user data from account store. So the user should be downloaded after login. We can provide selector from the account store, auth store or both (auth can reexport the selector)
  • Create some component\effect that will be download all data needed for the app (e.g. user, user-tags, VM etc.) between login and the main app. I was thinking about data resolver. (I think we can extract this task to another issue).

Example of ngrx auth store check here

tamazlykar avatar Jan 09 '19 03:01 tamazlykar

Still, work in progress

get my branch

git fetch https://github.com/HeyRoach/cloudstack-ui.get 388-auth:YOUR-BRANCH-NAME

HeyRoach avatar Jan 31 '19 06:01 HeyRoach