Closed bis-code closed 1 year ago
4291-b4ce-eb7f1681e57b">
The menu will only appear if the user is logged in
In login the user should only enter username OR email and type password once
In login the user should only enter username OR email and type password once
Ok, will change it according
FYI in the backend we check which (email or username) is provided, so you can just send one of them null
Decided to create the pages with the api calls already since there's only a bit of work to do.
Created authService which will continously check if user has logged in, and if not, then it will redirect user to the login page, where he can choose to either login or register a new account. Added authService in auth component and created state for it Created lazy module - auth.module.ts which is a separated module from the app.module.ts (main module) Created html pages for login and register Created ngxs states - selector, actions, states Now if user logs in, he will be redirected to the main page - overall-information page. Added icons in the top of the overlay for logout and login. The logout will only appear if the user has logged in and vice-versa