ibm-cloudboxoauth-2.0

Box login - how do develop opn both localhost and in production?


I have:

My current redirect_uri is "http:/localhost:3000". The app works fine if I run locally, It fails miserably if I deploy to Bluemix (e.g. "https://myapp.mybluemix.net").

I believe you can register multiple redirect_uris for a single Oauth2 client_id/client_secret in Facebook and Google, But I can't see any workaround in Box. Except to create a second app...

These posts are similar, but I don't need to authenticate TO a separate OAuth2 server ... I just need to authenticate FROM two different ENVIRONMENTS (my Node app locally, vs. the same Node app on Bluemix).

Is there any way that I can register multiple redirect_uris for the same Box app?

Addendum

  1. Following from the reply from Murtza Manzur:

    Box does not support multiple domain redirect URIs. To use different domains (localhost and mybluemix.net), you would have to create a separate app for each domain.

  2. This means I need two Box apps, and I need to configure my Bluemix/Node app to use one or the other.

  3. Here is an excellent discussion about how to do that efficiently and securely in Bluemix:


Solution

  • Box does not support multiple domain redirect URIs. To use different domains (localhost and mybluemix.net), you would have to create a separate app for each domain.