I Need to restrict the logged in user from accessing all the routes when the user is forced to change password after its expiry.
The user should not be able to manipulate the URL in the address bar once he is redirected to the change-password screen.
New to Angular and need assistance in implementing this.
You can use Guards. For example if you have a
LoginComponentandMainComponent, you can use a guard to check if the user logged in or not. you can define it in yourroute.module.tsroute.module.ts:
authGaurd:
for further information check docs : https://angular.io/api/router/CanActivate