First: You can try JWT, which is a kind of Token and does not require a session. I recently made an APP and found it very good. Second: session process (1) APP sends user name and password to the server; (2) The server queries the database for the correct user name, generates a session, stores it in memory, and returns the cookie to the APP. (3) The APP receives each request with a cookie, and the server determines whether the cookie is correct and outdated through the session. Third: The simplest way to implement it.
First, you can set the server session time to be longer. If the session fails, the login page will be redirected to allow the user to log in again. Second, you can silently call the login interface in the background during the Splash page to help users log in automatically.
First: You can try JWT, which is a kind of Token and does not require a session. I recently made an APP and found it very good.
Second: session process (1) APP sends user name and password to the server; (2) The server queries the database for the correct user name, generates a session, stores it in memory, and returns the cookie to the APP. (3) The APP receives each request with a cookie, and the server determines whether the cookie is correct and outdated through the session.
Third: The simplest way to implement it.
First, you can set the server session time to be longer. If the session fails, the login page will be redirected to allow the user to log in again.
Second, you can silently call the login interface in the background during the Splash page to help users log in automatically.