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

 找回密码
 注册
搜索

[教学] Xamarin.Forms Google Sign-In for iOS Firebase Auth for iOS

[复制链接]
发表于 2018-2-3 17:14:55 | 显示全部楼层 |阅读模式
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

手机版|大马资讯论坛  

GMT+8, 2024-3-28 23:51 , Processed in 0.149802 second(s), 13 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表