title: How to use findOrCreate in Sequelize
body: <p>I am a Sequelize beginner.
  I'd like to oAuth authenticate with Twitter or Facebook and want to save user information in the database.</p>
  
  <p>But if OAuth authentication is done on multiple sites, there is a problem that information such as <code>userid</code> registered in the database will collide with the other sites.</p>
  
  <p>In order to avoid this, I would like to do a process to update the database only when the specified <code>userid</code> does not already exist in the database.</p>
  
  <p>I knew that we could use Sequelize's <code>findOrCreate</code> to do it, but I do not know how to use <code>findOrCreate</code>.
  I know how to use upsert and I'd like to use <code>findOrCreate</code> like the description of upsert below. However, we want to perform conditional branching like this:</p>
  
  <p><code>if (userid! = "○○○" &amp;&amp; username! = "○○○")</code>.</p>
  
  <pre class="lang-js prettyprint-override"><code>User.upsert({
    userid:    profile.id,
    username:  profile.username,
    accountid: c + 1,
  }).then(() =&gt; {
    done(null, profile);
  });
  </code></pre>
  
  <p>What should I do?</p>