cloudstack-ui
cloudstack-ui copied to clipboard
Add ngrx dependency and rewrite authentication to use ngrx store
- Please move authentication code to Auth module
- Add required selectors/reducers/effects
- Change the way UI handles login/logout actions
- 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
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
Still, work in progress
get my branch
git fetch https://github.com/HeyRoach/cloudstack-ui.get 388-auth:YOUR-BRANCH-NAME