11
Views
0
Comments
[IdP] GetCurrentUserClaims is empty (maybe an Oracle DB issue)
Forge component by Rui Barbosa
44
Published on 07 Oct 2020
Application Type
Traditional Web, Reactive

I don't know why, but this actions was always returning no Claims, although we have data on UserSession entity.
I started debugging and discovery that the Text Variables "MobileSPKey" and "ReactKey" even when they are "" or NullTextIdentifier(), inside the action its lengths are 1, so always <> "" even when it is empty.

To fix that I had to change the filter in the aggregate

GetUserSessionClaimByUserSessionId

To 

(Trim(MobileSPKey) <> NullTextIdentifier() and UserSession.UserId = GetUserId() and UserSession.MobileSPKey = MobileSPKey and UserSession.FromMobile = True and UserSession.Active = True)
or
(Trim(ReactKey) <> NullTextIdentifier() and UserSession.UserId = GetUserId() and ReactToken.UserId = GetUserId() and ReactToken.Token = ReactKey and UserSession.Active = True)
or
(Trim(MobileSPKey) = NullTextIdentifier() and Trim(ReactKey) = NullTextIdentifier() and UserSession.Id = UserSessionId)


I don't know if this is an issue with Oracle installation, but please, if it is possible to include that fix in future versions, it will be great