code: function(authStore, session) {
    var found = false;
  
    for (var i = 0; i < authStore.length; i++) {
      if (authStore[i].equal(session)) {
        found = true;
        break;
      }
    }
  
    if (!found) authStore.push(session);
  }
docs: Add to store only if it does not exist