12
Views
2
Comments
 Logging in with SAML taking user to the OutSystems Users application.
Application Type
Reactive

Hi,

I am using SAML-based authentication and it's working fine but sometimes after I enter my credentials it's taking me to the Outsystems user's application instead of going to the home page. Not sure what's going on here.

Thank you for your time.

I am not sure about the exact scenario where this is happening to you, but from my experience I have had this happen when a Login flow is triggered after the user is already logged in. For example:

  1. Open MyApp in two browser tabs
  2. Go to first tab, click Login in one of them, and then login successfully
  3. Go to the second tab and click on Login again (it takes you to the OutSystems Users module)

Something that helped me avoid this problem is adding a check in your login flows (e.g. Interface > Common > UserInfo > ClientLogin) so that if the user is already logged in, it doesn't redirect them to the SSO URL and instead takes them to some other Screen in your application. For example, add something like the following before the User_GetUnifiedLoginUrl Action (GetUserId() <> NullIdentifier() Effectively checks if the user is already logged in):

There is a chance this is not enough to solve the problem completely but it should be a step in the right direction.