18
Views
1
Comments
Solved
System Login function always returns False... Why?
Question
Application Type
Reactive

I have a multi-tenant software product which may be used by Enterprise users from different companies. As such, it supports AAD (working), Native Outsystems (working) and Okta (not working!) logins.
For the Okta login I'm calling an Okta API, passing over the username and password entered by the user, Okta then says "SUCCESS" or gives a 401 - if Okta gives Success, I get the userid for the user with that email address from the Users table and then pass that User.Id to the System "Login" function, with Persistent set to "True".
For some reason, the Login function ALWAYS returns "False" (and nothing else) - even though I have logging showing that Okta returned Success, that the UserId is the correct user, etc. Login always fails and I get bounced back to the main Login page, with no UI error (and no login). 
Any suggestions on how to get this working? Essentially the Okta auth works - but I can't get the Outsystems user to log in! I don't HAVE the users password, and have no way of keeping it in sync with Okta, so... I can't use Users.DoLogin which is why I'm using System.Login.

2024-01-17 17-49-50
Jason K
Solution

Issue was 100% me. There were 3x paths through my code where this needed to be done, and I was only doing it correctly in 2 of them!

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