[Auth] Implement Authentication Guard to check if the user is logged in or not.
Closed this issue · 0 comments
ahmedeid6842 commented
Done:
- Inherit
CanActivate
interface and implementcanActivate
method. - check if there is
userId
assigned to user session or not, which is a check for user authentication.Note: By default by using
CanActivate
interface, it'll handle the return ofNotAuthenticated
401 status in case you return falsy.