keppelen / react-facebook-login

A Component React for Facebook Login
1.19k stars 405 forks source link

callback function is getting called even after we close the facebook dialog modal #309

Open bipindubey-technoark opened 4 years ago

bipindubey-technoark commented 4 years ago

I am currently facing issue in react-facebook-login. when we click on facebook button a modal is opened but if we close that modal then also callback function is get called. i dont have to call function if modal is closed. Following is my code <FacebookLogin appId="XYZ" fields="name,email,picture" onClick={componentClicked} callback={responseFacebook} cssClass={classes.facebook} size="small" textButton='Facebook' /> for now componenetclicked function just print some dummy data and in responseFacebook function i call api. I have to prevent to calling to responseFacebook if modal is closed. Thanks

hamish0361 commented 2 years ago

Did you fix it yet?

kavish-peiris commented 2 years ago

Did you find a solution for this @bipindubey-technoark. Or at least a way to identify the close event in callback?

edbasti commented 1 year ago

I am encountering the same issue until now. Is there a fix for this? This seems to be a bug because it automatically logs in the user even if you do not enter valid credentials.

edbasti commented 1 year ago

Did anyone able to find a solution for this @hamish0361 @bipindubey-technoark ?