Douyin has just been installed. Users who do not log in can watch the content.
you will be prompted to log in directly when you only click like, double click like, comment and other functions.
whether the interception was done in the foreground or in the background;
or both foreground and backstage,
what is the division of labor if both the foreground and the backstage are done?
the front end determines whether there is a token, without token and directly jumps to the front end to log in
is there a token, at the front end that needs to send data to the background? Or directly like the operation, and then determine whether the token is valid at the backend. If it is valid, the like is successful, and if the token is invalid, jump to the login page.
is it necessary for the front end to determine whether there is a token?