I have a `Phonegap` application that is communicating with `Nodejs` server.

Also for the `Facebook\Twitter` login I'm using `Hello.js` library (which is very easy to use by the way).

Unfortunately this library only makes client side login (authentication), so at server side I don't know if the user is valid or not (have been looged in with Facebook\Twitter).

Edit:
After the user is logged in (client side), `Hello.js` provides the user credentials, with a Facebook unique user ID, but I don't know how to pass it safely to the server, or generally if its a good idea to use it as a user id in my DB.

I'm looking for a simple example that will check the validity of the login at server side too.

Thanks.