ich das folgende Skript verwendet hatte Google-AuthentifizierungGoogle SignIn Anmelden Skript nicht funktioniert
//google auth code
gapi.load('auth2', function() {//load in the auth2 api's, without it gapi.auth2 will be undefined
gapi.auth2.init(
{
client_id: '1063305095705-k68gpfhi46tbu6kv8e8tidc751hte5pb.apps.googleusercontent.com'
}
);
var GoogleAuth = gapi.auth2.getAuthInstance();//get's a GoogleAuth instance with your client-id, needs to be called after gapi.auth2.init
$scope.onLogInButtonClick=function(){//add a function to the controller so ng-click can bind to it
GoogleAuth.signIn().then(function(response){//request to sign in
console.log(response);
console.log(response.wc.wc);
console.log(response.wc.hg);
console.log(response.wc.Ph);
});
};
});
Ich versuche zu verwenden, das in einer anderen Anwendung und immer die folgenden Fehler zu integrieren: -
gapi.auth2.ExternallyVisibleError: gapi.auth2 has been initialized with
different options. Consider calling gapi.auth2.getAuthInstance()
instead of gapi.auth2.init().
Ich habe auch
<script src="https://apis.google.com/js/platform.js?key=xxxxxxxxx"></script>
alles scheint in Ordnung, verstehe nicht, warum es tun Es funktioniert nicht ..