title: How do password managers know when I've logged in successfully?
body: <p>So you know how you are presented with a login screen and then, you fill it out, and then the browser loads the next page? At this point, somehow the password manager bar pops up for LastPass, 1Password, or some other extension, asking if you want to save the password. How do they know you've just logged in successfully??</p>
  
  <ul>
  <li>Forms are sometimes submitted and other times the js intercepts the form submit and sends AJAX.</li>
  <li>The response comes back and may set a new cookie, but sometimes the existing session cookie continues to be used (allows session fixation attacks but some implementations do that).</li>
  <li>A new location is loaded or reloaded but sometimes the javascript reloads a portion of the document instead</li>
  </ul>
  
  <p>But somehow these password managers DETECT that I've logged into a site successfully! How? Is it because I entered something in a password field, and then some form was submitted or some network request was sent? But how do they know it was successful?</p>
  
  <p>Anyone familiar with these password managers able to give some useful info?</p>
  
  <p>The reason I ask is that I want to develop an extension that detects when you've logged in and somehow tries to extract your user id from the service. It is for the purposes of sharing your user id with friends automatically, and letting them know (with your permission) what sites you are using a lot.</p>
  
  <p>Any hints on techniques to extract the logged-in user's id on the service would also be helpful.</p>