How to get equivalent of “req.something” from in angular with nodejs

后端 未结 1 1562
萌比男神i
萌比男神i 2021-01-18 20:11

I\'m following a tutorial on how to set up authentication with nodejs and passport. (http://scotch.io/tutorials/javascript/easy-node-authentication-setup-and-local)

1条回答
  •  春和景丽
    2021-01-18 20:33

    A similar question was answered here: What is the proper way to log in users using Angular & Express?

    TLDR: the answer posted was to the following link, where the author describes that you need to keep all the passport stuff on the server side, and then allow the client side (angular stuff) to request information about the session. http://vickev.com/#!/article/authentication-in-single-page-applications-node-js-passportjs-angularjs

    0 讨论(0)
提交回复
热议问题