私は「http://example.com/oauth2callback」にredireturlを修正し、中を取得しています誤りであるXamarinのデモに
async void OnAuthenticationCompleted (object sender, AuthenticatorCompletedEventArgs e)
{
if (e.IsAuthenticated) {
// If the user is authenticated, request their basic user data from Google
// UserInfoUrl = https://www.googleapis.com/oauth2/v2/userinfo
var request = new OAuth2Request ("GET", new Uri (Constants.UserInfoUrl), null, e.Account);
var response = await request.GetResponseAsync();
if (response != null) {
// Deserialize the data and store it in the account store
// The users email address will be used to identify data in SimpleDB
string userJson = response.GetResponseText();
App.User = JsonConvert.DeserializeObject<User> (userJson);
e.Account.Username = App.User.Email;
AccountStore.Create().Save (e.Account, App.AppName);
}
}
// If the user is logged in navigate to the TodoList page.
// Otherwise allow another login attempt.
App.SuccessfulLoginAction.Invoke();
}
を与えサインアップ
が必要ですiosプロジェクトはinfo.plistに次のキーを追加してATS設定を変更しました
NSAppTransportSecurity - Dictionary NSAllowsArbitraryLoadsInWebContent - ブール - はい
特定のXamarinデモはありますか?彼らにはサンプルプロジェクトがたくさんあります。 – Jason
エラーはかなり明白です。あなたが認証されていない使用限度を超えていないと思う何らかの理由がありますか? –
@jason:TodoAWSAuth次のリンクhttps://developer.xamarin.com/samples/xamarin-forms/WebServices/TodoAWSAuth/ –