packages/auth/demo/public/script.js
function logAdditionalUserInfo(response) {
  if (response.additionalUserInfo) {
    if (response.additionalUserInfo.username) {
      log(response.additionalUserInfo['providerId'] + ' username: ' +
          response.additionalUserInfo.username);
    }
    if (response.additionalUserInfo.profile) {
      log(response.additionalUserInfo['providerId'] + ' profile information:');
      log(JSON.stringify(response.additionalUserInfo.profile, null, 2));
    }
    if (typeof response.additionalUserInfo.isNewUser !== 'undefined') {
      log(response.additionalUserInfo['providerId'] + ' isNewUser: ' +
          response.additionalUserInfo.isNewUser);
    }
  }
}
function logAdditionalUserInfo(response) {
  if (response.additionalUserInfo) {
    if (response.additionalUserInfo.username) {
      log(response.additionalUserInfo['providerId'] + ' username: ' +
          response.additionalUserInfo.username);
    }
    if (response.additionalUserInfo.profile) {
      log(response.additionalUserInfo['providerId'] + ' profile information:');
      log(JSON.stringify(response.additionalUserInfo.profile, null, 2));
    }
    if (typeof response.additionalUserInfo.isNewUser !== 'undefined') {
      log(response.additionalUserInfo['providerId'] + ' isNewUser: ' +
          response.additionalUserInfo.isNewUser);
    }
  }
}
function logAdditionalUserInfo ( response ) { if ( response . additionalUserInfo ) { if ( response . additionalUserInfo . username ) { log ( response . additionalUserInfo [ 'providerId' ] + ' username: ' + response . additionalUserInfo . username ) ; } if ( response . additionalUserInfo . profile ) { log ( response . additionalUserInfo [ 'providerId' ] + ' profile information:' ) ; log ( JSON . stringify ( response . additionalUserInfo . profile , null , 2 ) ) ; } if ( typeof response . additionalUserInfo . isNewUser !== 'undefined' ) { log ( response . additionalUserInfo [ 'providerId' ] + ' isNewUser: ' + response . additionalUserInfo . isNewUser ) ; } } }
Logs additional user info returned by a sign-in event, if available.
@param {!Object} response
Logs additional user info returned by a sign - in event if available .