0

AAD B2C を使用して、Xamarin.Forms アプリで更新トークンを設定しようとしています。すべての設定が完了しましたが、 を呼び出すときに問題が発生しLoginAsyncますMobileServiceClient。私が見つけることができるすべてのドキュメントと例は、私のLoginAsyncメソッドをこれに更新することを示しています:

var user = await App.MobileServiceClient.LoginAsync(MobileServiceAuthenticationProvider.WindowsAzureActiveDirectory,
    new Dictionary<string, string>() { { "response_type", "code id_token" } });

ただし、は 2 番目のパラメーターMobileServiceClientに a を使用しません。Dictionary<string, string>かかりますJObject。現在のコードは次のようになります。

var authResult = await App.AuthenticationClient.AcquireTokenAsync(Constants.Scopes, "", UiOptions.SelectAccount, string.Empty, null, Constants.Authority, Constants.Policy);

var payload = new JObject();
payload["access_token"] = authResult.Token;

var user = await App.MobileServiceClient.LoginAsync(MobileServiceAuthenticationProvider.WindowsAzureActiveDirectory, payload);

JObjectどこでもを使用する例が見つかりません。ペイロード
に追加するのと同じくらい簡単ですか?payload["response_type"] = "code id_token";

4

1 に答える 1