I have configured Facebook and Google for SSO. My users are able to login to discourse using her Facebook or Google account. I will now like to access Facebook/Google account details of the created discourse user such as Unique Id, name , email received from Facebook or Google.
I accessed user details using users/username.json. However I am not able to find anything in the JSON which is saying that the user was created from Google or Facebook and more details about the same.
The facebook_user_id is an application-specific user ID, that is, it only means anything in combination with the API keys used. They’re not giving you a real user ID that you can give to any other application.
Check the contents of response object {
status: ‘connected’,
authResponse: {
accessToken: ‘…’,
expiresIn:’…’,
signedRequest:’…’, userID:’…'
}
}
I have highlighted UserID in above response. userID is the ID of the person using the app. I am interested in knowing this id returned by facebook to discourse.
I have similar concerns: I have a forum with Facebook only logins. But people can change their user names (first name/last name) and emails. In user profile I can see only “Connected acounts: Facebook()” - that’s all.
So I’d like to have any relation to original FB account from Discourse account. Is it possible?