#Getting redirected to the landing page when i try to access to a protected url

2 messages · Page 1 of 1 (latest)

stoic dragon
#

Hello guys, so basically I have implemented Keycloak authguard in my angular app and I have added some components that forms the main dashboard I need to access to, I have protected it with canActivate but when I try to access to it when I am authenticated it redirects me to the landing page.. but when I am not authenticated it directs me to keycloak login page.. my problem is that it still redirected me to the landing page even when I am authenticated
my routing: https://pastebin.com/hrSp8qwX
my keycloak authguard: https://pastebin.com/XNaHK3WP

versed meadow
#

Hello window.location.origin in your guard is the problem is the goal is to access the bank part. Check window.location.origin on MDN for a full documentation of the format