Discord OAuth2 Invalid Redirect URL

Attempting to perform an OAuth2 flow between Discord and Bubble results in an error when starting the Auth flow: “Invalid OAuth2 redirect_uri”. Seems there have already been a few forum posts on this exact same issue over the last year or two that don’t seem to have been resolved.

I have tried almost all of the Discord plugins in the marketplace, and also configured my own using the Bubble API Connector - all of them result in the same problem.

The root of the problem seems to be that the actual redirect uri that Bubble is providing to Discord as a query parameter does not match the default shown in the API connector:

https://[appname].bubbleapps.io/api/1.1/oauth_redirect

vs.

https%3A%2F%2F[appname].bubbleapps.io%2Fversion-test%3Fdebug_mode%3Dtrue

Anyone have Discord authentication actually working?

Had the same issue with Zoho, had to change the redirect to the https://[my app name]/version-test/[my page name]?debug_mode=true
After doing this, was able to authenticate for further calls

Where square brackets are obviously replaced with real value