diff --git a/google-signin-aware.html b/google-signin-aware.html index 0b86a17..154c920 100644 --- a/google-signin-aware.html +++ b/google-signin-aware.html @@ -61,7 +61,9 @@ } if (val && val != this._clientId) { this._clientId = val; - this.initAuth2(); + if ('gapi' in window) { + this.initAuth2(); + } } }, @@ -423,10 +425,11 @@ }, /** pops up sign-in dialog */ - signIn: function() { + signIn: function(id) { this.assertAuthInitialized(); var params = { - 'scope': this.getMissingScopes() + 'scope': this.getMissingScopes(), + 'login_hint': id || '' }; // Proxy specific attributes through to the signIn options. @@ -727,8 +730,8 @@ }, /** pops up the authorization dialog */ - signIn: function() { - AuthEngine.signIn(); + signIn: function(id) { + AuthEngine.signIn(id); }, /** signs user out */