ahmedeid6842/music-store

[Auth] Implement Authentication Guard to check if the user is logged in or not.

Closed this issue · 0 comments

Done:

  • Inherit CanActivate interface and implement canActivate 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 of NotAuthenticated 401 status in case you return falsy.