Hi, I have a task
I have CMS for table Users. In CMS, you can make users not active.
if user not active in table Users, i want make auto log out in Mobile
How can i do that?
Thanks
Hello Christopher,
If I have understood correctly, you are maintaining your users in your own Users table and you can make a User inactive from your CMS. The below is relevant only if my understanding is correct.
When you make an User inactive, you want the user on the mobile to log out automatically.
You need to create an action that checks if the user is active or not and logs the user out and you need to call this action at various check points in your app (like screen actions).
This is a lot of effort, which can be avoided if you are using OutSystems users.
Regards
Hi Amal,
Thanks for your reply
That correct scenario..
I will consider it
As you are using external login, do check the below post that has quite a lot of information which might help you
https://www.outsystems.com/forums/discussion/44688/questions-regarding-external-login/
Best Regards
Hi Christopher,
Logging out an inactive user, can only be done if the Mobile application is aware that the User became inactive. In order to achieve this it will have to communicate with the server (and has to be online for this to work).
If this is unavoidable, my suggestion is:
If you place the InactiveUserChecker block from 3. on the Layout block (or you implemented 3. directly on your Layout block) then all your screens will be protected (and, optionally, regularly trying to check whether the user is still active).
For extra security, you probably still want all Client Actions and Server Actions to also call, respectively, CheckInactiveUser or AutoLogoutOnInactive (you don't want any logic to run when it shouldn't)
This is some overhead on your Mobile app's performance and network connectivity and should only be implemented if really mandated by your requirements.
I haven't tested any of this, hope I didn't miss any relevant details... hope it helps!