Index: remoting/webapp/base/js/auth_init.js |
diff --git a/remoting/webapp/base/js/auth_init.js b/remoting/webapp/base/js/auth_init.js |
index 009edd149f4a5e7cb07bceb10cfccd856c85c70d..60bddf02c5d0a5f8133f4d7019516a5633bd3c04 100644 |
--- a/remoting/webapp/base/js/auth_init.js |
+++ b/remoting/webapp/base/js/auth_init.js |
@@ -8,24 +8,14 @@ |
var remoting = remoting || {}; |
/** |
- * Get the user's email address and full name. |
+ * Initialize the identity and authentication components. |
* |
- * @param {function(string,string):void} onUserInfoAvailable Callback invoked |
- * when the user's email address and full name are available. |
* @return {void} Nothing. |
*/ |
-remoting.initIdentity = function(onUserInfoAvailable) { |
- |
- /** @param {remoting.Error} error */ |
- function onGetIdentityInfoError(error) { |
- // No need to show the error message for NOT_AUTHENTICATED |
- // because we will show "auth-dialog". |
- if (error != remoting.Error.NOT_AUTHENTICATED) { |
- remoting.showErrorMessage(error); |
- } |
- } |
- |
+remoting.initIdentity = function() { |
if (base.isAppsV2()) { |
+ // TODO(jamiewalch): Add a getAuthDialog method to Application.Delegate |
+ // to allow this behaviour to be customized. |
Jamie
2015/03/05 01:35:55
For example, AppStreaming should not use an in-DOM
|
remoting.identity = |
new remoting.Identity(remoting.AuthDialog.getInstance()); |
} else { |
@@ -41,15 +31,6 @@ remoting.initIdentity = function(onUserInfoAvailable) { |
}); |
} |
} |
- |
- remoting.identity.getUserInfo().then( |
- /** @param {{email:string, name:string}} userInfo */ |
- function(userInfo) { |
- onUserInfoAvailable(userInfo.email, userInfo.name); |
- }).catch(function(error) { |
- onGetIdentityInfoError( |
- /** @type {remoting.Error} */ (error)); |
- }); |
}; |
/** |