I have recently noticed that in a mobile app the GetUserId() function sometimes returns a NullIdentifier or Zero. I suspect it has something to do with a timeout of the mobile authentication for the logged in User?

Reading this article https://success.outsystems.com/Documentation/10/Managing_the_Applications_Lifecycle/Secure_the_Applications/Configure_Mobile_App_Authentication does this mean that if a Mobile app that requires Login is idle (in this example where max idle time = 30 mins) then the user authentication would essentially be revoked or lapse and from that point the GetUserId() would return a NullIdentifier, similar to a session timeout in a web app.



A quick test shows that with my Mobile Max IdleTime set to 30mins in my personal environment the GetUserId() function returns a NullIdentifier (or 0) after approx 60mins. While the app continues to work? Is this expected behavior?

In a further test leaving the app idle for 3 hrs GetUserId() returned the correct UserId? 

So why does it sometimes fail?