Send me a screenshot of the URL once you hit authorize.
Jon Khaykin
1

https://api.producthunt.com/v1/oauth/authorize?client_id=[PH_Key]&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fusers%2Fauth%2Fproducthunt%2Fcallback&response_type=code&scope=public+private&state=2718f2cec10e3f6777f6ae6fb1f0357dbd2fb1478a7f8a3d

^ That is the url before I hit authorize

This is the Redirect URI in the dashboard:

Redirect URI: http://localhost:3000/users/auth/producthunt/callback

My console prints:

Started GET “/users/auth/producthunt/callback?code=[access grant code]&state=8752a7bc00a38af9aa55d9787db201df08ee335fb5adbdde” for ::1 at 2016–02–19 13:44:39 -0500

I, [2016–02–19T13:44:39.096195 #42697] INFO — omniauth: (producthunt) Callback phase initiated.

E, [2016–02–19T13:44:39.653967 #42697] ERROR — omniauth: (producthunt) Authentication failure! invalid_credentials: OAuth2::Error, invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

{“error”:”invalid_grant”,”error_description”:”The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.”}

Processing by OmniauthCallbacksController#failure as HTML

Parameters: {“code”=>”code=[access grant code]”, “state”=>”8752a7bc00a38af9aa55d9787db201df08ee335fb5adbdde”}

Redirected to http://localhost:3000/users/sign_in

Completed 302 Found in 3ms (ActiveRecord: 0.0ms)