keppelen / react-facebook-login

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

Update facebook.js #280

Closed YouMinTW closed 4 years ago

YouMinTW commented 4 years ago

Add determination of state which only comes from facebookdirect. The facebook.js can't recognize the url callback from different Social Login.

I have tried to use different social login and decodeParamForKey(params, 'code') in facebook.js will work on url even the response code not comes from Facebook and pop up the Facebook auth Login modal.

(For example, I used Line Login (Liff2) and it will also callback my app and the url return as below

http://localhost:3000/login?code=some-code-from-line&liffClientId=some-id&state=some-state&liffRedirectUri=my-redirect-uri

and isRedirectedFromFb() excutes then break off the Line Login in my app)