I have implemented react-facebook-login in React. I am getting the user info in react from Facebook. Now I want to register the user on the server with the user info. But I can't send this data directly from the front to the backend because I won't know if the data is actually from Facebook or the user has played with it. I mean that we can't trust the data like this. How I will know on the server that the data is from Facebook. Is there any event, a callback or trigger on the Facebook side for this whenever a user tries to login with Facebook? Like a url on my server that should be called with the info?
<ReactFacebookLogin
appId="myappid"
fields="name,email,picture"
onClick={reactFBClick}
callback={responseFacebook} />
I also checked it with these two props but nothing seems working.
redirectUri='myurl'
redirectIfAuthenticated={true}
Help will be appreciated greatly. Thanks!