Error using discourse-oauth2-basic plugin with NeonCRM

So if I use this URL instead:

https://MY-NEON-ID.z2systems.com/np/oauth/auth?response_type=code&client_id=MY-CLIENT-ID&redirect_uri=https://MY-FORUM.COM/

(I removed the callback part at the end of my redirect_uri)

I actually make it to the NeonCRM login page, after which I enter my test user credentials and log in. I am then redirected to MY-FORUM.COM. But once I’m there I am not logged in at all. If I click on the “Login” button at the top of the page and click on the grey "login with OAtuh2: button, a new window opens with the following message:

And two errors show up in my logs:

ArgumentError (Invalid URI: )

/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/excon-0.64.0/lib/excon.rb:126:in `new’

and

Failed to handle exception in exception app middleware : Invalid URI: