Token based authentication and Facebook Authentication in nodejs

John Major Source

I am working with MEAN stack. Front-end and back-end are separate projects. My backend nodejs REST api use token based authentication (users login with username and password credentials then server will generate a JWT for further request.) I also have a middleware to verify the token. By now I needed to allowed users to login with facebook, I use passport-facebook strategy before I changed to token based authentication. It was session based authentication. So how could I generate token when user is successfully login via facebook? Is there any particular package in npm using facebook authentication with token? Thanks.

node.jsfacebookauthenticationtokenjwt

Answers

comments powered by Disqus