Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 在ionic 4中对MSDAL进行身份验证后,重定向URL是什么?_Angular_Azure_Ionic Framework_Cordova Plugins_Adal - Fatal编程技术网

Angular 在ionic 4中对MSDAL进行身份验证后,重定向URL是什么?

Angular 在ionic 4中对MSDAL进行身份验证后,重定向URL是什么?,angular,azure,ionic-framework,cordova-plugins,adal,Angular,Azure,Ionic Framework,Cordova Plugins,Adal,当用户成功通过身份验证时,我想将其重定向到应用程序根页面。authContext.acquireTokenAsync的重定向URL是什么 let authContext: AuthenticationContext = this.msAdal.createAuthenticationContext('https://login.windows.net/common'); authContext.acquireTokenAsync('https://graph.windows.ne

当用户成功通过身份验证时,我想将其重定向到应用程序根页面。authContext.acquireTokenAsync的重定向URL是什么

      let authContext: AuthenticationContext = this.msAdal.createAuthenticationContext('https://login.windows.net/common');
  authContext.acquireTokenAsync('https://graph.windows.net', this.clientId, 'http://localhost:8100/')
    .then((authResponse: AuthenticationResult) => {
      alert('Token is' + authResponse.accessToken);
      alert('Token will expire on' + authResponse.expiresOn);
      this.statusBar.styleDefault();
      this.splashScreen.hide();
      this.nav.setRoot(HomePage);
    })
    .catch((e: any) => {
      alert('Authentication failed'+ e);
      this.nav.setRoot(HomePage);
    });

问题是该应用已在azure active directory上注册为WebApp。我已在active directory上将新应用注册为本机应用。通过重定向url“urn:ietf:wg:oauth:2.0:oob”,它现在可以完美地工作。这是我的密码

    let authContext: AuthenticationContext = this.msAdal.createAuthenticationContext('https://login.windows.net/common');
authContext.acquireTokenAsync('https://graph.windows.net','<Your Native App client ID>' , 'urn:ietf:wg:oauth:2.0:oob', '', null)
  .then((authResponse: AuthenticationResult) => {
    this.presentToast('Token is' + authResponse.accessToken + ' and expires on ' + authResponse.expiresOn);
    this.statusBar.styleDefault();
    this.splashScreen.hide();
    this.nav.setRoot(HomePage);
  })
  .catch((e: any) => {
    this.presentToast('Authentication failed ' + e)
  })
让authContext:AuthenticationContext=this.msAdal.createAuthenticationContext('https://login.windows.net/common');
authContext.acquireTokenAsync('https://graph.windows.net','',urn:ietf:wg:oauth:2.0:oob','',null)
。然后((authResponse:AuthenticationResult)=>{
this.presentToast('令牌为'+authResponse.accessToken+',并在'+authResponse.expiresOn'到期);
this.statusBar.styleDefault();
这个.splashScreen.hide();
this.nav.setRoot(主页);
})
.catch((e:any)=>{
this.presentToast('身份验证失败'+e)
})

我也在找同样的。