Set up Facebook login / login in the middle batch application.
So far I have done –
Step 1 – used square-6-social-login-library in the angular app. When the user clicks the (fb login) button, this library is returned with the facebook user data. This data includes the user profile and the ID.
step 2 – then this data will be sent to the server. The server checks the ID returned by Facebook in the database. If this ID does not exist, the user account will be created in the backend and its data will be returned to the Winkel app using JWT to continue logging in. OR If an ID exists, it will be returned to JWT for login.
Now I know that this river is wrong and no security is implemented here.
I read about Passport js Facebook strategy. But I can not understand this facebook strategy. How can I implement this into my middle stack app?