Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-15158

Facebook OAuth login results in fatal error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.2.1-RC1
    • 3.2.0
    • ACP, Login
    • PHP 5.6.28

      Logging in with Facebook OAuth results in the following fatal error:

      E_ERROR: Uncaught exception 'OAuth\Common\Http\Exception\TokenResponseException' with message 'Failed to request resource. HTTP Code: HTTP/1.1 400 Bad Request' in /forums/vendor/lusitanian/oauth/src/OAuth/Common/Http/Client/StreamClient.php:68
      Stack trace:
      #0 /forums/vendor/lusitanian/oauth/src/OAuth/OAuth2/Service/AbstractService.php(183): OAuth\Common\Http\Client\StreamClient->retrieveResponse(Object(OAuth\Common\Http\Uri\Uri), NULL, Array, 'GET')
      #1 /forums/phpbb/auth/provider/oauth/service/facebook.php(72): OAuth\OAuth2\Service\AbstractService->request('/me')
      #2 /forums/phpbb/auth/provider/oauth/oauth.php(557): phpbb\auth\provider\oauth\service\facebook->perform_auth_login()

      After some debugging, I'm able to locate the cause of the problem. (see /forums/vendor/lusitanian/oauth/src/OAuth/OAuth2/Service/Facebook.php line 161)

      The new Facebook response is in JSON format, while the pre-2.0 API returns jquery string.

      This bug can be fixed when you run composer update. (The lusitanian/oauth package has fixed it.)
      However, the fix is not included in the latest 3.2 download.

            nicofuma nicofuma
            catherinek catherinek [X] (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: