I would like to allow users to login to my site with oAuth (facebook/twitter) but I'm having trouble understanding how the security model works if I authenticate them client-side.
When the users authenticate, I receive a redirect with their authToken and ID. A lot of answers suggested to use the ID to query/store user's info in my database, but that is insecure since anyone can potentially know the ID and retrieve anyone's data.
Should I use the authToken from the server to check if it's valid and matches the ID? or is it assumed that the only way to login users to my site is to use server-side authentication?
Thanks,
-gene