我现有的应用程序使用:
$scope.signInGoogle = function(){
var ref = new Firebase(URL);
chrome.identity.getAuthToken({
interactive: true
}, function(token) {
localStorage.setItem("token",token);
if (chrome.runtime.lastError) {
alert(chrome.runtime.lastError.message);
return;
}
// Authenticate with Google using an existing OAuth 2.0 access token
ref.authWithOAuthToken("google", token, function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
$state.go("app.profile");
}
});
});};
需要知道如何使用Identity API登录firebase