can a redirect uri point to a local host?
I'm working on a php login for the box api, but I'm having some issues with the redirect uri. When I did my initial tests, I was able to have a successful test from http://localhost/whatever
Now that I'm starting to integrate it into a full development environment, I'm calling it be local.site.org/ - where I have a linux machine hosting the site. /etc/hosts is catching the call to local.site.org and apache is handling the request locally. This address works as well from http://localhost/site/ - but the site isn't configured to recognize that url anywhere.
This is how I've always preferred to do my development because it keeps my local and production environments easily distinguishable. The problem I'm running into however is that in the developer settings for my app, when I try to set the redirect uri to http://local.site.org, I get an error that it's a malformed url. Since my url does not match, I can't make any login attempts. Is there any way that I should be able to make this work on a local environment where the address is not at http://localhost/?
-
I use a port forwarding tool called ngrok. It is a free tool available at http://ngrok.io. Basically, you run the ngrok executable on your machine (local development machine) and it will create a custom subdomain at ngrok.io which then forwards to your localhost at the port you specify. It even includes a web view into all the requests forwarded to your localhost so you can review the contents and headers. It is a free tool but you can also upgrade to get permanent subdomains and other features. The tool is actually a single file that is run on the command line so there is no installation package.
Please sign in to leave a comment.
Comments
1 comment