Tutorial App Setting, Still Online and Forced Logout

Hi All,

Here is cloneable app.

App Setting collection is 1-record only and used to contain global variables, we can access it using list disguised as button. (login and signup button)

To make list of a button, by clicking vertical 3 dots in left panel.

Still Online is toggle (true/false) property in users collection, is used to make visible green ellipse at user’s icon (at top right corner).

Along with last online, this could be useful when doing bulk update to check how much time has elapsed, such as users are idle.

Forced Logout is to logout automatically when toggle property is true in users collection.

Every navigation to link screen is checked against this value.

Input fields and countdown are still visible, but can be squeeze and color change and relocated so that it don’t clutter the screen.

Regards.

4 Likes

Wonderful job! :slight_smile:

I have updated this app to have a list of online users, it is in tab 2 screen.

And the broken change input value is no longer used.


2 Likes

Hi, @Yongki

Would you be able to explain how this works a bit? Sorry i’m new to the platform and need a auto-logout feature for my app.

In home screen or any screen that you feel users are staying for lots of time, every components that have action to link to another screen should be checked if they are flagged for forced logout, so they need to login again if necessary.

While at the same time, we know that users are interacting with our app, so we mark them as still online.


@Yongki I understand now, thank you.

I was thinking this was a feature that would allow for an auto-logout. This seems (if im understanding it correctly) to be more of a manual process.

In this case, it needs trigger from user, but if you want trigger from time elapsed, we need countdown component on screen that do the same actions.

But also countdown wont work if the app is forced closed, the admin has to access it and wait for the countdown to end

Yes, all things don’t work, but if we put small number, user doesn’t have a chance to do that.

After they logout, we check the condition at login, so forced logout user is going nowhere.

@njimmy10 I need your help with an app. Can I email you?

Yes of course.

Is it posted here?