What are the usage scenarios of token authentication?

  node.js, question

I recently wrote a forum, vue Plus express, Single page application, App.vue inside, which can load the home page, log in, register, etc., and then handle the authentication as follows: the home page is rendered with jade, and session authentication, that is, after logging in, req.session.user will have it. This user will be transferred to the window object through jade, and VUE will render according to user. . .

Recently, I saw an article saying that node no longer manages sessions under the separation of front and back ends. can the above example be considered as separation of front and back ends (only the front page is rendered by node), I still use session verification, and the feeling is ok. may I ask under what scenario token is used?

The front and back ends of the scene need to be separated across domains, binding to the window object … seems to be unheard of