Hi,
My scenario: some pages within my main container are designed only for logged-in users. I wish to create a flow where a user clicks the link, if he is logged in, he will enter the page and if not, he will be redirected to the login page and after login in, he will be redirected to the previously selected page.
I have seen the logic within the default login page and I can see that it supports this scenario, but strangely: the redirecttoURL parameter is sourced from PageData
This is a bit strange as this data only exists within the container, so I would need to use AppData to pass it from the other container.
I have tried to use AppData for it, but something doesn’t work as I would expect. My current setup:
OnBeforePageEnter login on the page for logged in users:
Login on the login page:
Based on my understanding this should work, but it doesn’t. The AppData is not passed:
(one more thing: my logic is placed in “OnBeforePageEnter”, but still page is loaded within the browser and redirect is done after the page is displayed )