how to handle multiple tenants with onedrive picke

2019-02-20 03:52发布

问题:

I am facing a problem with onedrive picker with https://js.live.net/v5.0/OneDrive.js

I have different redirect url's like

http://dev.example.com

http://dev1.example.com

by giving these two urls i am facing problem like this

when i give redirect url it is not working.

and i tried using https://js.live.net/v7.0/OneDrive.js while i am using this one in pop only the redirect url is loading and redirecting and closing the pop up i am not getting the call back success

<script type="text/javascript" src="https://js.live.net/v5.0/OneDrive.js" id="onedrive-js" client-id="APP_ID"></script>


<script type="text/javascript">
      function launchOneDriveSaver(){
var saverOptions = {
      success: function(files){
            console.log(files);
      },
     progress: function(p) {
    // upload is progressing
    },
    cancel: function(){
    // upload was cancelled
   },
   error: function(e) {
  // an error occured
  }

        OneDrive.save(saverOptions);
      }
</script>

回答1:

Have you tried adding root domain? Try this order :

http://example.com
http://dev.example.com
http://dev1.example.com