离子 2 Google +
Ionic 2 Google +
是否有任何使用 google + 登录 IONIC2 的工作示例?我是新来的。我只看到 Ionic 1.
据我所知,离子 1 上有这些示例:
https://ionicthemes.com/tutorials/about/google-plus-login-with-ionic-framework#step1
github.com/EddyVerbruggen/cordova-plugin-googleplus
还有一个在 Ionic2 中使用 oAuth2 的示例,这是我在全世界发现的最接近的东西。但是要使用这个例子,我必须使用他们的 "registration" :
你可以使用 firebase。您可以用几行代码实现 google 身份验证。
var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com");
ref.authWithOAuthPopup("google", function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
请在此处查看文档 firebase documentation
是否有任何使用 google + 登录 IONIC2 的工作示例?我是新来的。我只看到 Ionic 1.
据我所知,离子 1 上有这些示例:
https://ionicthemes.com/tutorials/about/google-plus-login-with-ionic-framework#step1
github.com/EddyVerbruggen/cordova-plugin-googleplus
还有一个在 Ionic2 中使用 oAuth2 的示例,这是我在全世界发现的最接近的东西。但是要使用这个例子,我必须使用他们的 "registration" :
你可以使用 firebase。您可以用几行代码实现 google 身份验证。
var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com");
ref.authWithOAuthPopup("google", function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
请在此处查看文档 firebase documentation