Social Media Login

Hey, for my app I’m going to need a login system with FB; Google and Twitter (maybe even Digits). I’ve searched and also found passport.js and so on, but the actual problem is, that you just get the OAuth Token returned in passport but I need to assign the returned token to a database entry.

So my first idea was: in the app you signup with a combination of email and password, these will be send encrypted to a web backend where a new database entry will be made, this one contains a token which will be send back to the client so the user doesn’t need to login anymore. But how can I have a similair setup with social media logins? Is is possible to use passport.js for this or do I need to setup every social media login for its own?

Kind regards