Saving into localStorage with nodejs

后端 未结 3 1107
余生分开走
余生分开走 2021-02-03 14:23

I need to save jwt-token in local-storage through nodejs after the user has logged in (has been authorized ).

After I check if the user/password is correct in my control

3条回答
  •  故里飘歌
    2021-02-03 14:24

    In the client call to /login use xmlhttpresponse object, then add an event listener for 'load'. This will give the client the responseObject where you have added the token. Then in the event listener put your localStorage code

提交回复
热议问题