Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-13172

Uncaught exception thrown when using OAuth account before completing link



    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 3.1.0-RC5
    • 3.1.13-RC1
    • Login
    • None


      When a user tries to link to an external account, they are told to simply click the "Link" button. This then bounces them outside of the forum and then back to the login screen. There are no special instructions on this login screen, but the url is along the lines of: ucp.php?i=ucp_auth_link&mode=auth_link&link=1&oauth_service=google&code=abcde....

      If the user clicks the "Google" button on this page, the following error is thrown:

      Fatal error: Uncaught exception 'OAuth\Common\Http\Exception\TokenResponseException' with message 'Failed to request resource.' in C:\wamp\www\phpBB310RC2\vendor\lusitanian\oauth\src\OAuth\Common\Http\Client\StreamClient.php on line 54
      OAuth\Common\Http\Exception\TokenResponseException: Failed to request resource. in C:\wamp\www\phpBB310RC2\vendor\lusitanian\oauth\src\OAuth\Common\Http\Client\StreamClient.php on line 54
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0020	204152	{main}( )	..\ucp.php:0
      2	0.1360	7317256	login_box( )	..\ucp.php:276
      3	0.1360	7317872	phpbb\auth\auth->login( )	..\functions.php:2831
      4	0.1360	7318352	phpbb\auth\provider\oauth\oauth->login( )	..\auth.php:937
      5	0.1450	7585632	phpbb\auth\provider\oauth\service\google->perform_auth_login( )	..\oauth.php:198
      6	0.1450	7585856	OAuth\OAuth2\Service\AbstractService->requestAccessToken( )	..\google.php:80
      7	0.1450	7587280	OAuth\Common\Http\Client\StreamClient->retrieveResponse( )	..\AbstractService.php:97

      Apparently, the correct course of action is to log in with your normal board credentials to complete the linking process.

      It should be made clear that the user needs to log in with their board credentials, as well as catch the exception so that users aren't seeing fatal errors.




            Unassigned Unassigned
            Noxwizard Patrick Webster
            0 Vote for this issue
            3 Start watching this issue