I am developing an application in OutSystems ODC with two separate applications in different environments:
App A (Frontend): Contains the UI and login screen.
App B (Backend): Contains the login APIs, server actions, and backend logic. The built-in Login (or DoLogin) Client Action is also located in App B.
I want to call the login API from App A, but after successful authentication, I need to execute the built-in Login Client Action in App B to establish the user's authenticated session.
Since Client Actions cannot be directly called across applications, how can I trigger the Login Client Action in App B from App A? Is there a recommended approach in ODC to handle this scenario while using OutSystems' built-in authentication?
Hi @Shivam Patel ,
Could you clarify what you mean by two applications in different environments?
For example:
App A (Frontend): https://stage1.outsystems.app/
App B (Backend): https://stage2.outsystems.app/
Are both applications deployed in separate ODC environments, or are they within the same environment but separated into frontend and backend applications?
Also, how are you managing user authentication? Are both applications using the same ODC user identity provider, or are users managed separately?
If both applications are in the same environment, you should be able to expose the required authentication logic through Service Actions or APIs. However, the built-in Login Client Action needs to execute within the frontend application's client context to establish the authenticated session.
If the applications are in different environments, calling the backend login API will not automatically establish an authenticated session in the frontend environment. In that case, you should consider a shared identity provider or an SSO-based approach.
Understanding your environment setup and user management approach will help identify the most suitable solution.