title: Connecting to Google Talk over XMPP on Node.js
body: <p>I've tried using a variety of XMPP libraries for Node.js, and am having trouble connecting to Google Talk's XMPP servers.  I'm wanting to connect and read the status of friends, but I can't even get out door!</p>
  
  <ol>
  <li>I have a personal domain hosted through Google Apps for Domains, e.g., <code>mydomain.com</code>.</li>
  <li><p>I've got the following code written - it makes use of the node-xmpp library (<a href="https://github.com/astro/node-xmpp">https://github.com/astro/node-xmpp</a>):</p>
  
  <pre><code>jid = 'ryan@mydomain.com';
  password = 'my_google_password';
  
  // Establish a connection
  var conn = new xmpp.Component({
      jid         : jid,
      password    : password,
      host        : 'talk.google.com',
      port        : 5222
  });
  conn.on('online', function(){
      sys.put("ONLINE");        
  });
  conn.on('error', function(e) {
       sys.puts(e);
  });
  </code></pre></li>
  </ol>
  
  <p>A connection is established, but authentication fails, and I receive this message back from Google Talk:</p>
  
  <pre><code>&lt;stream:error xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"&gt;
      &lt;not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-streams"/&gt;
  &lt;/stream:error&gt;
  </code></pre>
  
  <p>...am I missing something?  I've tried other libraries (https://github.com/mwild1/xmppjs), and  even a Python library, and still haven't been able to authenticate.  I'm 100% sure my Google username and password are correct - any tips/ideas?</p>