Callback url not working in local development with .test domain


#1

I am having trouble with the recently introduced changes to the API and callback urls. My apps in production and stage environments (which are having “real” domains) are working fine after setting the correct callback urls.

But my app in local development mode is not working. Twitter throws a 403 “Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings”

I am using omniauth, puma-dev and the .test TLD for local development. My app lives under https://sos.local and the callback url is https://sos.local/auth/twitter/callback
I have the same callback url set in my app development dashboard. Every environment has it’s own app in the twitter app dashboard.

Is there a problem with using the .test top level domain? Any chance to still use oauth callbacks in local development?

20:54:11 log.1       | twitterwall[43690]: [httplog] Sending: POST http://api.twitter.com:443/oauth/request_token
20:54:11 log.1       | twitterwall[43690]: [httplog] Header: accept-encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20:54:11 log.1       | twitterwall[43690]: [httplog] Header: accept: */*
20:54:11 log.1       | twitterwall[43690]: [httplog] Header: user-agent: OAuth gem v0.5.4
20:54:11 log.1       | twitterwall[43690]: [httplog] Header: content-length: 0
20:54:11 log.1       | twitterwall[43690]: [httplog] Header: content-type: application/x-www-form-urlencoded
20:54:11 log.1       | twitterwall[43690]: [httplog] Header: authorization: OAuth oauth_callback="https%3A%2F%2Fsos.test%2Fauth%2Ftwitter%2Fcallback", oauth_consumer_key="...", oauth_nonce="...", oauth_signature="...", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1528916051", oauth_version="1.0"
20:54:11 log.1       | twitterwall[43690]: [httplog] Header: connection: close
20:54:11 log.1       | twitterwall[43690]: [httplog] Data: 
20:54:12 log.1       | twitterwall[43690]: [httplog] Status: 403

Thanks
Christian