phpbb OAuth与NASA Earthdata集成

I'm currently working on implementing an OAuth plugin to a forum using NASA's EarthData login. I've cobbled together an OAuth file using the OAuth tutorial from phpbb (specifically the bitly file), as well as NASA's own SSO with php tutorial (found here: https://developer.earthdata.nasa.gov/urs/urs-integration/implementing-earthdata-login-sso/sso-with-php)

Unfortunately, the current behavior of the forum is as follows:

1 - I press login, and the forum redirects me to EarthData Login

2- I login using my EarthData credentials

3 - the EarthData site returns me to the forum, but I remain unauthenticated.

It appears as if the json string containing the login info is in the browser url, but not getting pulled down to authenticate the user. Am I missing a step somewhere? Please see below for a snippet of the final authentication code:

public function perform_token_auth()
{

      // Check the token exchange response status
    if( $status != 200 )

    {

      header("HTTP/1.1 403 Forbidden");

      exit(0);

    }

    $json = json_decode($result, true);

    if( !isset($json['access_token']) )

    {

      header("HTTP/1.1 403 Forbidden");

      exit(0);

    }

    $token = $json['access_token'];