title: MVC4 Simple Membership authentication with multiple databases or providers
body: <p>I'm working on an MVC4 site using SimpleMembership to handle user accounts and role based authentication. We have another site and we'd like to implement a single sign on system allowing users from the existing site to log in to the one I am building. What would be the best way to achieve this and hopefully leverage to the existing roles based authorization I'm using on the MVC4 site. Is it possible to have multiple membership providers (i.e. use the built in one and if the user is not found, attempt to authenticate via a custom provider that I'll write (once I work out how!). Or would it be better to abandon the built in membership/roles and roll my own?</p>
  
  <p>I also thought of letting WebSecurity check the local database and if the user is not found, query the 2nd database and if the users credentials are valid, create a local account for them. One issue with this approach is if a user called Fred registers on the MVC site, and then a user from the other site called Fred logs in, we couldn't create them a local account with the same username. We could prefix/suffix the username with some text to indicate that they are from the other site but then we lose the single sign on feature.</p>
  
  <p>We will also want to integrate AD authentication for staff in the future.</p>
  
  <p>So essentially I'm looking for the best way to authenticate users from multiple databases and keep using roles based authentication?</p>
  
  <p>I've also done a little digging was wondering if ADFS might be useful for this. </p>
  
  <p>Any help or advice would be greatly appreciated!</p>