Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ionic framework 如何在Ionic 2应用程序中实现Google OAuth?_Ionic Framework_Google Oauth_Ionic2_Ionic View - Fatal编程技术网

Ionic framework 如何在Ionic 2应用程序中实现Google OAuth?

Ionic framework 如何在Ionic 2应用程序中实现Google OAuth?,ionic-framework,google-oauth,ionic2,ionic-view,Ionic Framework,Google Oauth,Ionic2,Ionic View,我需要在我的Ionic v2应用程序中添加Google登录 目前我无法使用,因为它是 我也尝试过这个插件,但我不能使用ionic-service或测试身份验证,这对我来说是一个巨大的不便,因为我不再有一个简单的方式向客户端显示应用程序 所以。。。任何替代方案?Firebase用户身份验证是一种替代方案,您只需几行代码即可实现google身份验证 var ref=新Firebase(“https://.firebaseio.com"); 参考authWithOAuthPopup(“谷歌”,函数(

我需要在我的Ionic v2应用程序中添加Google登录

目前我无法使用,因为它是

我也尝试过这个插件,但我不能使用
ionic-service
或测试身份验证,这对我来说是一个巨大的不便,因为我不再有一个简单的方式向客户端显示应用程序


所以。。。任何替代方案?

Firebase用户身份验证是一种替代方案,您只需几行代码即可实现google身份验证

var ref=新Firebase(“https://.firebaseio.com");
参考authWithOAuthPopup(“谷歌”,函数(错误,authData){
如果(错误){
log(“登录失败!”,错误);
}否则{
log(“使用有效负载成功进行身份验证:”,authData);
}

});我目前正在使用此解决方案,但有一个限制。Firebase不会刷新Google的OAuth访问令牌,因此它将在1小时后过期。Firebase google oauth现在无法根据以下线程工作: