I have been attempting the backend voting app and I am kinda stuck. I am doing this using the mean stack approach and I want to use facebook and twitter to authenticate for me instead of creating my own db and using local/jwt to do it.
What I have so far are the apis which display the information gotten from facebook/twitter at localhost:3000/users/profile,(using passport.authenticate()) but which are only accessible if I am able to login in the first place, as well as the angular side being able to retrieve another collection in the same mongo db that stores the polls and votes which allows for display and voting.
What I am stuck at is how do I go about redirecting from angular such that it navigates to the facebook/twitter login pages, is authenticated(thus allowing localhost:3000/users/profile to retrieve user profile information), and then redirecting it back to the angular side(which is then able to display the profile information gotten from facebook/twitter through ngOnInit() )? Would be glad if anybody is able to help out!