Want to ask, how to achieve in the app login, registration, the recommended way is. How to keep the login status and determine the expiration time.
Web-side also want to log in, register if you keep the app and web State shared.
Reply content:
Want to ask, how to achieve in the app login, registration, the recommended way is. How to keep the login status and determine the expiration time.
Web-side also want to log in, register if you keep the app and web State shared.
It is recommended that the backend implement a unified registration, login interface, such as the popular Restfull API form. The Web and app logins only need to invoke the interface, reusing code and decoupling.
State sharing can be logged on any one side of the time, synchronization of the other side of the login information
Every time you request it, the head adds tokens to the login.