Trying to get OAuth2 working with the eBay API using the golang.org/x/oauth2 package.
I have reduced the problem to the minimal possible demonstration in a gist at
Here’s the sequence of events.
When you vist the root directory it is supposed to take you to eBay to sign in (as a sandbox user). It does so. When you sign in with a proper username and password, it’s supposed to take you to a page asking you to give permission to the app to make changes to the account. It does so. It then takes you to the authorization accepted page specified by the RuName, which it does. At that point it’s supposed to supply you with a long string the &code parameter representing the permission. And it does! I can see it the successfully returned token in the address bar of the browser!
However, when I use FormValue() or any other way to inspect the &code parameter, it returns an empty string, so as you see in the gist it displays the “Dude” error message.
Only the secrets have been changed in the gist. Obviously I couldn’t get as far as the as the authorization accepted page if I had them wrong.
Can anyone help me? If I had hair I’d be pulling it out.