Add API endpoint to check if user login token is correct
While /createuser
could be used to check if the user exists, there is no way to know if the login token provided by the user is correct. Hence, I propose an endpoint named /checkuser
that accepts the username and logintoken, which then returns {success: true}
if they match up; if not, provide a reason/failure code that could be used by clients to determine which error message to show in the login dialog.
Edited by Nam Thành Nguyễn