Add passportjs to already created ReactJS node express app

Hi,

I’m learning ReactJS, Node and Express. I kind of created an app with routes pages/components.

I want to add passportJS auth into this. I went through a tutorial on YouTube and I cannot seem to understand or figure out how to add this.

I can create a Login.js after a success from passportjs. But how can I make rest of the pages to work “ONLY” after this sucess login.

I can convert the Login.js to be my Home.js ( Home Page ). But my other pages will still work if i type in the page name in the URL Eg: http :confused: / localhost:3000/users

Any suggestions please on how I can add passportjs to my already working app.

Also, is it recommended I start with passportJS login and work from there up in future? how do you guys do it?