how does the first leg of Oauth work when using 'http://localhost/blah' in the app's redirect uri?
回答済みI am just starting to develop a first Box (administrative) app, and would like to obtain a first authorization code for an admin user. When I use 'http://localhost' as the redirect url in the app's configuration, I see that when the admin user 'grants' access to the app, the (Chrome) browser shows the following address in the url after clicking on 'grant':
'localhost/blah' (sort of as expected) but however, it displays a blank page, and my Java app installed at 'http://somehostname:80/blah' does not get called (this is what I was expecting would happen).
Am I misunderstanding what should be happening when using a 'localhost' redirect uri?
Any help will be appreciated. Thanks!
-
OK, I figured this out already. I had imagined that Box would be 'smart' enough to figure out the address of my hostname when using 'localhost' in the redirectURI, but this is obviously not what happens, and I really needed to have the code running on 'localhost:port' for it to work. Once I did this, it worked as expected.
-
Glad that you managed to get to the bottom of this.
here is a little bit more about the "redirect_uri" field from our developer.box.com reference documents
Redirect_Uri - An HTTPS URI or custom URL scheme where the response will be redirected. Must be https and also be registered within the Box app management console. In development, local http hosts are also accepted as outlined in the tutorial below
Tutorial: https://docs.box.com/docs/oauth-20
サインインしてコメントを残してください。
コメント
2件のコメント