title: OAuth 2.0 Implementation - Should Auth Server and Resource Server Have Separate Databases?
body: <p>The official Specifications probably don't mention this or regard it as "outside the scope of this specification".</p>
  
  <p>Say we have decided to separate the auth and resource servers.</p>
  
  <p>In practice, why would we want the resource and auth servers to access the same database, or why would we want to keep two separate databases - one for each server?</p>
  
  <p>I'm writing this question because of Entity Framework. If I shared the same database between both sites, I figure migrations would conflict even if the auth server only touched account-related tables and the resource server only touched data (POCO) tables. (I actually haven't tried this out yet, but I don't want to waste time experimenting, so I want to hear from someone who has come across this.)</p>
  
  <p>But if I separate the databases, I lose the foreign key relationship between user and the data [s]he owns - but is that even necessary? It feels like it's one of those "we did that just because" practices.</p>