PHP Authorization Tutorial stuck in "Loading"

Good morning,

I am trying to follow the PHP tutorial, installed MAMP, and did the required changes, but when opening the localhost:8888 I get a message that says Loading.. but nothing else happens.

111997bdd2db875f4a761ca07e34284f-huge-er

I tried different browsers, and I tried to use PHP version 7 and 5, but it is not working. Does anyone know how to fix this, or what settings am I missing?

Thanks

Fabio

Tutorial I am following:

Comments

  • Michael Tims
    Michael Tims Blackbaud Employee
    Sixth Anniversary Kudos 2 Name Dropper Participant

    Hi @Fabio Gonzalez - I will run through this tutorial today to see if I can get further and report back. Stay tuned.

  • Michael Tims
    Michael Tims Blackbaud Employee
    Sixth Anniversary Kudos 2 Name Dropper Participant

    @Fabio Gonzalez - are you seeing the “Loading…” when the app is first launched or after you're prompted with the consent form and click the “Authorize” button?

    Instead of trying MAMP, you can install the PHP Debug VSCode extension and try running its integrated example web server.

    I'm trying to get the app up and running - it's able to get an authorization code but appears to be failing on getting an access token. Just wanted to see if you were able to get that far.

  • @Michael Tims

    I will try to run it with the extension you suggested.

    I have made two changes. One, I moved my folder with the cloned code from GitHub to a folder in C drive. And set MAMP to have the document root pointing to my directory in C. After that, I got the application to load, but it gave me one error related to the callback address.

    I changed the config.php line for the redirect as follows:

    define('AUTH_REDIRECT_URI', 'http://localhost:8888/auth/callback.php');

    After this change, I am able to click on the login button, and I get the “authorize” screen from blackbaud, but right after clicking authorize, I get the error listed in the image below

    3c7870049da29e38b16003514565795c-huge-im


    I haven't made more progress from here.

  • Michael Tims
    Michael Tims Blackbaud Employee
    Sixth Anniversary Kudos 2 Name Dropper Participant

    @Fabio Gonzalez -thanks. That's exactly the point I'm at right now as well (both with MAMP and using the Xdebug server. It appears to be failing to create a token, so it won't have the expiration date values in the token, hence the parse error.

    I'll keep digging into it. I believe we are close. There could an issue calling the POST over https if SSL isn't wired up correctly. I'm not a php expert, so trying to get a grasp on it while I make my way through.