I have espace "backoffice" and other "layout". In the layout espace there is the Login default screen and I want to use this login screen and functionality in the backoffice espace. I added the login screen as a dependecy in the "backoffice" espace. And I have a link "Login" that has the destination this login web screen.
When the user clicks in the "login" link it goes to the login screen and after login with success he is redirected to the homepage that exists in the "layout" espace but I would like to redirect the user to the home page of the "backoffice" espace. Do you know how to achieve that?
Hello again.
You probably deleted more than you should have...
This is standard behavior you see under the Common UI Flow. I picked a random project and copied from there.
1. You save the URL in session before going to login page.
2. After a successful login, you go to the saved URL.
3. Done.
Easy, right?
Hi, in the layout module its like that! However Im using that login screen and functionality in the backoffice module. In the backoffice module I have a link that has as destination the "Login" screen added as a dependecy from the layout module. My doubt is how to redirect to the homepage of the backoffice module because the homepage of the backoffice module is not in the layout module its in the backoffice module. Thanks!
I still think you shouldn't use the same login page (as I explained in the other topic) but if you want:
If the page is always the same, you can set a unique destination.Or you can create an input parameter and do the same logic that we see here with a value from session.
You are saying to have an input parameter in the login action in the layout module? But in that input parameter how to store the url of the homepage of the layout module? And the same for the backoffice module, how to store in the input parameter the url of the homepage of the backoffice module? Thanks!
We can keep it easy.
The input is a boolean (not mandatory).
If inputDestinationBackOffice=True go to Backoffice- If not, go to session as before.
The Destination Page must be in the References (it is a weak reference so don't worry about it coming from an upper layer)
Hi Nuno!
Can you clarify more on why you shouldn't use the same login screen for different users? Did I understand you correctly that its better to create a separate application for different users?
I'm also planning to make a reactive application that redirects users to the appropriate page
(e.g. user -> user profile, admin -> admin page)
Thanks!
Hi Anthony,
We can keep it simple!The same Login screen can be used in any other module's screen. Add an optional input parameter say "RedirectURL" to the Login screen. Do the following changes in the Login action.
Hope it works.