CSRF state token does not match one provided FB PHP SDK 3.1.1 Oauth 2.0

后端 未结 9 1994
难免孤独
难免孤独 2020-12-01 12:12

My server logs show a \"CSRF state token does not match one provided\" error which seems to happen for almost every user. However, the users are created and/or authenticated

9条回答
  •  被撕碎了的回忆
    2020-12-01 12:47

    I had the same issue. It´s easy. Don´t call

    $fbLoginUrl = $facebook->getLoginUrl(...);
    

    before

    $fbUser = $facebook->getUser();
    

    otherwise you will get "CSRF state token does not match one provided" error.

提交回复
热议问题