How to design a schema for a site that accepts logins from multiple sites (e.g. facebook connect, google, flickr, etc..)? I'm building a site ("The Site") and I'm considering how to design the DB schema for it.

I have a few scenarios that will affect the outcome:


The user can choose to register a native account on the site, which will make him use that account for login in to his account on the site in the future.
The user can choose to login via another site ("external site") (such as facebook connect, google, foursquare, etc..), which will make him use that for login in to his account on the site in the future.
Doesn't really matter which login method he chose (native account or external site account), the user will be able to authenticate his account on the site with external sites (such as facebook, twitter, instagram, etc...) for using the data he has on the external site (such as his tweets from twitter, his photos from flickr, etc..), in the site.


How should I design the schema of the DB ?

For the first two scenarios, I thought of having a table called Users that has an id, and a type fields. The type reference a different table, such as FacebookUsers or GoogleUsers, each has a user_id field - which has a foreign relation to the Users.id field - and other fields such as the first_name, profile_picture, etc..

However:


I'm not sure how smart it is to use this approach.
I don't know how to implement the third scenario in such an approach.
There is a similar question in stackoverflow

And the solution is


  You need 2 additional fields in your
  table, one is the login source
  (twitter, openID, facebook) and the
  other is the source user id (the id
  provided from twitter, openID,
  facebook) I recommend making this a
  string as some log in sources have
  letters in their user IDs and not just
  numbers. more



I'm not sure how smart it is to use this approach.  



  This approach is good, actually sites
  opting it. see SO login page
  https://stackoverflow.com/users/login



I don't know how to implement the third scenario in such an approach.  



  I think  you can implement this, only
  if the thrid party sites provide
  access. This question is off-topic
  here, you can ask this in
  stackoverflow