keppelen / react-facebook-login

A Component React for Facebook Login
1.18k stars 406 forks source link

Overriding current access token #286

Open ViktorMeduneckij opened 4 years ago

ViktorMeduneckij commented 4 years ago

Not sure if this is Facebook issue, or package, but maybe someone had this and could share solution. Basically, 2 out of 20 users cannot login and they get:

You are overriding current access token, that means some other app is expecting different access token and you will probably break things. Please consider passing access_token directly to API parameters instead of overriding the global settings

Anyone knows why this happens? It is really strange that this only happens to a part of users, majority of them are fine. At the moment I am solving this case by case, creating test users for people who cannot login. I really don't like this workaround, but it is what it is. This is my react-facebook-login setup:

<FacebookLogin
  appId="<id>"
  autoLoad={true}
  fields="name,email"
  callback={responseFacebook}
  disableMobileRedirect={true}
/>

I have disableMobileRedirect as I had issues with mobile devices (numerous issues created on this board).

Geeza commented 4 years ago

We have the same issue

jmayergit commented 4 years ago

Looks like a Facebook js sdk thing, https://developers.facebook.com/community/threads/680742385690883/

^ one of the comments

It is probably because you called FB.getLoginStatus followed by FB.login.

The library indiscriminately calls FB.login on every click which may be the cause.

  click = (e) => {
  ....

      window.FB.login(this.checkLoginState, { scope, return_scopes: returnScopes, auth_type: params.auth_type });
    }
  };
Dashue commented 4 years ago

Seeing this as well, any fix in sight?

Dashue commented 4 years ago

@keppelen I think there was a pr merged to close this issue. Will a new release be made or how are do we leverage this fix?

Odelya commented 4 years ago

I have the same. any update?

Dashue commented 4 years ago

@keppelen @jmayergit Any idea when there will be a release for this?

Alternatively does anyone else in this thread know of a workaround? Should I not be calling login if I have a valid facebook token already and use that until it expires or something along those lines?

Thanks, this is blocking production

Dashue commented 4 years ago

Also if you're looking for maintainers, I'm happy to chip in and spend some time moderating/maintaining projects I leverage myself.

Dashue commented 4 years ago

I've forked this repo and have created a new release including typings at "react-facebook-login": "https://github.com/Dashue/react-facebook-login#e97e169fb3e7102a73e6f77c04446deffc06ed2e",

I will be maintaining the fork as best I can and happy to join up with co-maintainers who are interested. If the fork gains usage my plain is to create react-facebook-login2 and publish on npm

eieikhaing752000 commented 1 year ago

I have also facing this issue .How to fix that?