producthunt / producthunt-api

Product Hunt API
311 stars 28 forks source link

OAuth redirect to localhost:3000 doesn't work #88

Closed dkogias closed 8 years ago

dkogias commented 8 years ago

I registered a separate app for testing with our local development instances. Something in the OAuth flow seems to not like the non-default port and/or plain http redirect URI, even though I'm allowed to register the app with those.

When I redirect to

https://api.producthunt.com/v1/oauth/authorize?response_type=code&scope=public+private&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fcallback&state=<state>&client_id=<my dev-specific app ID>

the popup is rendered with an error:

An error has occurred

The redirect uri included is not valid.

The same OAuth flow however, deployed behind a https-reachable server (and with client ID adjusted to the corresponding app registration) works.

dkogias commented 8 years ago

Never mind, client ID confusion after all.