2016-04-11 30 views
0

Azure Mobile Apps kullanıyorum ve kimlik bilgilerini bir Microsoft hesabı ve Facebook hesabıyla oluşturdum. https://studybuddy.azure-mobile.net/.auth/login/facebook/callbackAzure Mobile Apps kimlik doğrulaması - kimlik doğrulama yanıtının geçersiz biçimi

https://studybuddy.azure-mobile.net/.auth/login/microsoftaccount/callback

^^ Bu belirteç dönmez, inanıyorum. Girişten geri almam gereken "belirteç" olmadığı için "Kullanıcı" asla ayarlanmaz.

İlgili kod:

private async System.Threading.Tasks.Task<bool> AuthenticateAsync() 
    { 

     string message; 
     bool success = false; 
     try 
     { 
      // Change 'MobileService' to the name of your MobileServiceClient instance. 
      // Sign-in using Facebook authentication. 
      user = await App.MobileService 
       .LoginAsync(MobileServiceAuthenticationProvider.Facebook); 



      message = 
       string.Format("You are now signed in - {0}", user.UserId); 

      success = true; 
     } 
     catch (InvalidOperationException e) 
     { 
      message = "You must log in. Login Required"; 
     } 

     var dialog = new MessageDialog(message); 
     dialog.Commands.Add(new UICommand("OK")); 
     await dialog.ShowAsync(); 
     return success; 
    } 

cevap

0

sorun benim proje Azure'nin yeni Mobil Uygulamalarda içine Mobil Hizmet olarak şeyler yapmanın Azure'nin eski yoldan göç olmasıdır. Çözüm, bir Azure Mobile Service için eski kodu kullanması veya projeyi bir Azure Mobile App'e yükseltmesidir.

İlgili konular