Notify users if they are not on app's latest version


For a specific app I'd like like to let any users with active sessions on older versions be notified on the app when for example I publish a new release, or if say they've kept an open session in some browser tab for quite a while, and haven't refreshed since some new releases were made and published.

Is there a way to achieve this?

I essentially just need to verify when the user performs actions that call our backend APIs, that they are on the latest app version.

One possible solution is sending the current app version as a header to BE calls, and verifying that server-side, but it could require a lot of maintenance for the version number (unless there's a way of calling Retool for that info from our BE?)

Open to any suggestions/previous implementations if any, thank you!

Hey @Tianjing_Li!

People using an app should be automatically directed to the version you've specified as the live release and for those with the header there should be an indicator that a particular version is live:

I don't know of a way to make it more apparent to users if they happen to be on a different version though. Perhaps if you're sending {{ retoolContext.pageTag }} along with your requests, you can have your backend update the latest tag based on whether any request has come in with a version number that's > than whatever is in storage. That way, when you push a new release you'd just need to make one request from it for your backend to know the version has been updated.

What do you think?

If you're self-hosting Retool you can also try the USE_SHORT_SESSIONS environment variable which caps a session duration to 12 hours so that users will never be using a version older than that.