How to server side login using facebook and google?

my meteor app evolve to server side only now. so everything will be server side using rest api.

I need to login using social media on server side only.

this is example of payload :

"type" : "facebook",
"token" : "SOME_FB_TOKEN_HERE"

Google login :

"type" : "google",

it will return :


how to do that in server side?

Can you show more of your client side code and the method you have to receive it on the server?

Are you using the accounts packages from meteor?