In Rails it is a little bit more complex, but also not big deal. There is nice Rails cast #360 about it (12 minutes).
However it is good to know what data we are providing when we click 'Login with facebook'. I implemented facebook auth with omniauth-facebook library (according to above rails cast). I was surprised when I look at the source code.
This is auth data available for developer, when we sign in with facebook:
We provide our email(!), timezone and even location! Actually I was not aware of that. I thought facebook provides just basic info like name and photo.
We should think twice before we sign in to some website with OAuth. Especially due to providing our email address. Malicious websites can use it for sending spam.