Esempio n. 1
0
        private void Link(int row)
        {
            switch (row)
            {
            case 0:
                var weChatCredential = AGCWeiXinAuthProvider.CredentialWithToken("TOKEN", "OPEN_ID");
                LinkAccount(weChatCredential);
                break;

            case 1:
                var qqCredential = AGCQQAuthProvider.CredentialWithToken("TOKEN", "OPEN_ID");
                LinkAccount(qqCredential);
                break;

            case 2:
                var weiboCredential = AGCWeiboAuthProvider.CredentialWithToken("TOKEN", "UID");
                LinkAccount(weiboCredential);
                break;

            case 3:
                xamarinAuthHelper.AuthorizeFacebook((credential) =>
                {
                    if (credential != null)
                    {
                        LinkAccount(credential);
                    }
                });
                break;

            case 4:
                xamarinAuthHelper.AuthorizeGoogle((credential) =>
                {
                    if (credential != null)
                    {
                        LinkAccount(credential);
                    }
                });
                break;

            case 5:
                xamarinAuthHelper.AuthorizeTwitter((credential) =>
                {
                    if (credential != null)
                    {
                        LinkAccount(credential);
                    }
                });
                break;

            case 6:
                LinkPhoneAccount();
                break;

            case 7:
                LinkEmailAccount();
                break;

            case 8:
                var appleCredential = AGCAppleIDAuthProvider.CredentialWithIdentityToken("IdentityToken", "RequestNonce");
                LinkAccount(appleCredential);
                break;

            default:
                Console.WriteLine("none");
                break;
            }
            owner.RefreshLinkState();
        }
Esempio n. 2
0
        partial void WeiboLogin(NSObject sender)
        {
            AGCAuthCredential weiboCredential = AGCWeiboAuthProvider.CredentialWithToken("TOKEN", "UID");

            SignIn(weiboCredential);
        }