How is your experience with the OutSystems Community?
16
Views
8
Comments
Solved
Store the url

Hi All,

User will hit the button that will redirect to our application ,we want to store the url as it has all inputs ,but after login the url values and info will be lost,

any suggestion how to store the url when comes to application as its sso ,how to save the url info,

Regards

2026-06-05 12-38-17
Eduardo Jauch
Solution

When the user is redirected to your reactive application, the application will check if the user is logged in or not.

If you are using SSO between the application that is calling and the application the user is being redirected to, he will already be logged so he will just be redirected to the page.

If he is not logged yet in the reactive application, the URL he is being redirected to will be saved, he will have to make the login, and after the login (if successful), he will be redirected to the page. 

Nothing (the parameters) will be lost. Your page will receive them.

Cheers.

2026-06-05 12-38-17
Eduardo Jauch

Hello @Preeti zade 

Could you explain a bit more what is happening?

Is your application (the destination) a traditional web, reactive, mobile, odc? Are you going to the application from where? Another application? A mobile application? 

I think by default, when a user tries to access a screen in an application and the user is not logged in, a security exception will be thrown and the user will be redirected to the login page. 

If I remember well, the default login flow stores the destination screen (with the parameters) and will redirect the user to the correct screen (with the parameters) after a successful login. 

The above code is for an ODC application, but Reactive / Traditional have similar code.

Cheers!

UserImage.jpg
Preeti zade

Thank you,

We do no want the user to go to landing page,user should redirect to our page directly where the form is there and form is to be populated for reactive web app.so after login the url data will be lost? 

2026-06-05 12-38-17
Eduardo Jauch
Solution

When the user is redirected to your reactive application, the application will check if the user is logged in or not.

If you are using SSO between the application that is calling and the application the user is being redirected to, he will already be logged so he will just be redirected to the page.

If he is not logged yet in the reactive application, the URL he is being redirected to will be saved, he will have to make the login, and after the login (if successful), he will be redirected to the page. 

Nothing (the parameters) will be lost. Your page will receive them.

Cheers.

2026-06-06 05-35-01
ABHIJITH G
Champion

Hi @Preeti zade  ,

If the user is redirected to SSO/login before reaching the target Reactive screen, there is a risk that the original URL query parameters may be lost. A common and reliable approach is to capture the incoming URL parameters as soon as the request reaches the application (before authentication), store them temporarily in a database table along with a unique token, and pass only that token through the login/SSO flow. After successful authentication, redirect the user directly to the target form page, retrieve the saved parameters using the token, and populate the form. This avoids losing data during the SSO redirect and prevents the user from landing on an intermediate page.

Regards
Abhijith

2026-06-05 12-38-17
Eduardo Jauch

Hello @ABHIJITH G 

That should not happen in OutSystems, as Reactive/ODC applications have a login flow that takes this into consideration (see my first post). 

This MAY happen if the login flow was changed to use an external IdP login page and the code that stores the url end redirect the user was removed.

But even if that's the case, there is no need to store anything in the database. You can do like a normal reactive app and use a client variable to store the URL using the GetBookmarkableURL action like is done in the normal login flow. This works because even with an external IdP, when the user tries to reach a page and is not logged in, the redirect to the external login page will be made on the module exception flow.

Cheers

2026-06-06 05-35-01
ABHIJITH G
Champion

@Eduardo Jauch 

Good point. My understanding was that the URL parameters might be lost during the SSO redirect, so I suggested persisting them before authentication. However, for a standard OutSystems Reactive/ODC login flow, the framework already preserves the requested URL and redirects the user back after authentication. In that scenario, using GetBookmarkableURL and the existing login flow is the preferred approach, and database storage would only be needed if the login flow has been heavily customized or the default redirect mechanism was removed.
Thanks for clarification

2026-06-05 12-38-17
Eduardo Jauch


I think the database approach can be used, but not because of the login flow. Saving things in client variables may be something you don't want. For example, you may not want to keep the parameters in the client variable (that is stored client-side). In that case you could store in the database and retrieve on the page, when that is loaded.

So, more like a security feature than because of the complexity of the flow.

Cheers!

2026-06-05 12-38-17
Eduardo Jauch

@Preeti zade 

You mentioned SSO.

Is this the default SSO from OutSystems (Between OutSystems applications) or is this an external Identity Provider?

If this is the normal SSO from OutSystems (login is made in OutSystems), you should not lose the parameters. 

If you are using an external Identity Provider configured in the environment, but is still using the OutSystems Login page, you also should not lose the parameters.

If you are using an external Identity Provider with their own Login page, you must check the

1. On Exception on the reactive app (the one receiving the request). Is it saving the URL with the GetBookmarkableURL action? You should use it and save the result in a client variable.

2. Check the callback page that receives the result of the login, to see if it is using the client variable with the URL to redirect the user to the correct page (the one the user was trying to access). If not, you have to implement.

The way it should work is similar to what I showed in the first post. Save the URL in the exception flow, and redirect the user after the login is successful. 

Cheers

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.