After successful login application not redirecting to destination page

Dear Team,


I have created an REST based application, the application has three pages 1. Splash Screen, 2. Login Screen and 3. MainFlow\Test.

The login screen validation user id and password successfully but unable to redirect application to "MainFlow\Test" page. It is always redirecting users to login page.

Please find below the flowchart for your reference. 

Hi Avijit,

Where is the login validation done in this flow? Is it the If block? Judging by the name, I'd say it is not about login validation but about checking whether SyncOnLogin configuration is enabled or not. 

As long as no login validation is done and the Test screen is not anonymous, it will redirect to the login page.

Dear Ozan,


Thanks for the response, the login validation is happening in REST API internally. Based on input username and password REST API returns Success or Failure. In validate response node applications checks the response is success or not, it it is success it should redirect users to Test page.  I have attached the revised diagram.


  

Hello Avijit.

Does your screen have all the roles checked? 

Because if not, you will need to run this action 

I think that could be your problem.


Kind regards,

Rachid

Hi Avijit,

As Sumeiya rightly pointed, that Rest API might return a validation result, but that doesn't mean that it logs the user in to OutSystems platform (I don't know the internal working of the API). 


So if the validation is successful (and your Test screen is not anonymous), you should indeed run the DoLogin action.

Hi Avijit,

As you mentioned that Login api is getting call internally and in ValidateResponseStatus you are checking the status of login. So want to confirm when application execute this check(ValidateResponseStatus) api return the result before that.

Second and more important point is you are using custom login using API. But main page may have restricted to registered user only. So after using your login API are you updating same in Outsystems db, means like DoLogin method do. If not then even after success from API, application will be consider it as not registered.

Thanks.

Just a question... 

Are you login in in OutSystems After your REST does the login? I assume your REST does an external authentication. 

If not login in OutSystems, as mentioned before, this is the outcome expected, as the page, not being anonymous, requires the user to be logged in OutSystems, as it is not, it raises a security exception and redirects you to the Login page. 

Cheers 

Hi All,

Thanks for all the responses you had given and helped me to solve the issue. It was really a great discussion with you, the root cause of the issue was I messed up the “Login event”.

I have attached my design below along with explanation, so that you can see and recommend me if there is any better approach.  


Though the issues has been resolved but I have two question:

As my application validating users details from my internal database then why "Configuration Sync On  Login" and "SyncOnLogin" require.

Is it possible to bypass the same. 


Thanks,

Avijit

Solution

Hello Avijit,

If you want to bypass Outsystems authentication then you need to make all the screen access annonoymas and then do access according to your logic. BUT its not good practice if you are using Outsystems.

Thanks.

Solution