Nodejs Sky API Auth Code Example issues

When working through the "sky-api-tutorial-auth-code-nodejs" example code at: https://github.com/blackbaud/sky-api-tutorial-auth-code-nodejs, I can auth but the redirect fails and the user is not authenticated.

The C# example works using the same credentials, so I'm not sure what really is going on here. On the redirect, I get an error: Response Error: Bad Request.

52847666d25bc64ffe2d9ffec21533ed-huge-im

It looks like a GitHub issue was filed for it back in March but I haven't seen any updates since then: https://github.com/blackbaud/sky-api-tutorial-auth-code-nodejs/issues/11

EDIT:

I was able to get the auth flow working by adding the following to config in auth.js:
options: { authorizationMethod: 'body' }

e83e1b32ca502e0f8395e83df6a24810-huge-im

Comments

  • Chris Rodgers
    Chris Rodgers Blackbaud Employee
    Ninth Anniversary Kudos 2 Name Dropper Participant

    Hey @Lucas Foster, thanks for pointing this out. We'll take a look.

  • @Chris Rodgers
    I added some additional logging around auth.js and it's showing invalid client:

    8c0e090ff27edf69f16bb300d988b11b-huge-im
  • @Chris Rodgers
    I was able to get the auth flow working by adding the following to config in auth.js:
    options: { authorizationMethod: 'body' }

    4b451ce0f60b47f7ca7b955dc2772644-huge-im

    It's not pulling the Constituent details, but it shows I'm authenticated now. I will dive in some more tomorrow.

    EDIT: I was able to get the Constituent details pulled after additional review. Some error handling I had added previously broke the API response.