AAD B2Cを使用してXamarin.Formsアプリでリフレッシュトークンを設定しようとしています。すべてをセットアップしましたが、MobileServiceClient
にLoginAsync
を呼び出すと問題にぶつかります。 MobileServiceClient
2番目のパラメータのためのDictionary<string, string>
を取らないことを除いてAzure App ServiceとXamarin.FormsでのAAD B2Cでのリフレッシュトークンの使用
var user = await App.MobileServiceClient.LoginAsync(MobileServiceAuthenticationProvider.WindowsAzureActiveDirectory,
new Dictionary<string, string>() { { "response_type", "code id_token" } });
:docsと例のすべてが、私はこれに私のLoginAsync
方法を更新するためにショーを見つけることができます。それにはJObject
が必要です。私は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);
:ここに私の現在のコードは次のようになります。
ペイロードにpayload["response_type"] = "code id_token";
を追加するのと同じくらい簡単ですか?
この問題は解決しましたか、さらに支援が必要ですか? –