+ 2

session

hi i recently created a website( reactjs) and host it with domain name eg: domain1.com and then i have backend(express) with different domain eg: domain2.com since both are sitting on different domains,how can i create a session such as user can log in / log out? im new to web development so hope someone can guide me tq

12th Jun 2020, 11:34 AM
durian
durian - avatar
1 Answer
+ 3
You can consider using Passportjs and passport-local-mongoose. https://www.npmjs.com/package/passport-local-mongoose Use rest api to communicate between front end and back end.
12th Jun 2020, 12:28 PM
CalviŐ˛
CalviŐ˛ - avatar