私はAzure App Serviceを使用しています。ユーザーを認証するためにMicrosoftアカウントを使用したいと思いますが、ユーザーが自分の認証情報を入力して「あなたは正常にウェブサイトにログインしました」を取得した後、私のUWPに制御を戻しません。私はLoginAsyncから「真」を削除した場合、私は例外だAzureモバイルアプリ認証
LiveLoginResult result = await liveIdClient.LoginAsync(new[] "wl.basic" });
if (result.Status == LiveConnectSessionStatus.Connected)
{
session = result.Session;
var client = new LiveConnectClient(result.Session);
LiveOperationResult meResult = await client.GetAsync("me");
var provider = MobileServiceAuthenticationProvider.MicrosoftAccount;
user = await App.MobileService.LoginAsync(provider, true);
}
は言う:認証応答の 無効な形式
は、ここに私のコードです。
MobileServiceInvalidOperationException型の例外がスローされます –
@ MustafaSaeed、 'var provider = MobileServiceAuthenticationProvider.MicrosoftAccount;を置き換えようとしましたか? user = await App.MobileService.LoginAsync(provider、true); 'MobileServiceUser loginResult = App.MobileServiceを待機します .LoginWithMicrosoftAccountAsync(result.Session.AuthenticationToken);'? –
はい、私はそれを行い、その行は例外をスローする –