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

Uncaught exception thrown when using OAuth account before completing link

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Do
    • 3.1.0-RC5
    • None
    • Login
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Marc Marc
              Noxwizard Patrick Webster
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: