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

 找回密码
 注册
搜索
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
1#
发表于 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-12-5 05:35 , Processed in 0.013899 second(s), 12 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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