0

I'm writing a mobile client app of RAD server using Delphi 11.1. I'm using TBackendAuth to do user login. Both login and logout work well.

However, I found that every time the app is closed, the state of the user login will be lost. The user needs to log in again if the app is opened again, unless the user is careful not to close but just put the app in the background.

In real-life situations, it's just too easy to close a mobile app either intentionally or accidentally. The frequent login behavior makes the app almost not usable practically.

But remembering user login state is just a very common feature of many different apps on the market such that there is no need to re-login unnecessarily. So can any experts please help me understand how to save and reload the login state in a client app with respect to RAD Server?

Tom Brunberg
  • 20,312
  • 8
  • 37
  • 54
MW3226
  • 53
  • 5
  • Old generic question on same: https://stackoverflow.com/questions/1925486/android-storing-username-and-password read through answers and comments. – Brian Apr 14 '22 at 21:20
  • Thanks for your pointer. However, as the discussions mentioned, the general best practice is to store and restore the session/authorization token obtained from the server after the initial login for as long as it is allowed. The problem with a RAD Server client is that the token is just a read-only property of TBackendAuth. You cannot write to it. So there seems no way I can restore it back after it's lost. That's the problem I need to solve. – MW3226 Apr 15 '22 at 04:34

0 Answers0