大马资讯论坛 - 马来西亚中文资讯平台

标题: [教学] Xamarin.Forms Google Sign-In for iOS Firebase Auth for iOS [打印本页]

作者: 资讯王    时间: 2018-2-3 17:14
标题: [教学] Xamarin.Forms Google Sign-In for iOS Firebase Auth for iOS
1. 首先,你要把login form画出来
https://github.com/renzska/GoogleSignInForms

2. 设定Google Sign-In for iOS - GoogleService-Info.plist, CLIENT_ID
https://components.xamarin.com/gettingstarted/googleiossignin

3. 设定Firebase.Auth
public void DidSignIn(SignIn signIn, GoogleUser user, Foundation.NSError error)
{
        if (user != null && error == null)
        {
                //开始布局你的DidSignIn
                var authentication = user.Authentication;
                       var credential = GoogleAuthProvider.GetCredential(authentication.IdToken, authentication.AccessToken);
        }
}
https://components.xamarin.com/gettingstarted/firebaseiosauth




欢迎光临 大马资讯论坛 - 马来西亚中文资讯平台 (http://freeinfo.com.my/) Powered by Discuz! X3.3