During my current application, Let me provide the options for that customers for connecting them trough your password or any social networking or open id platforms.

I'd will also publish message on their own wall (facebook, twitter, buzz mostly) when they link their accounts to my application.

The issue I face is when I'm able to organize my tables within the database.

Here's the way i would do, but with no convictions :

User(first_name, last_name, email)
LocalUser(password, user_id)
FacebookUser(token, user_id)
GoogleUser(token, user_id)

When the user connect through Facebook, I'll fill all of the data within the User table I'm able to, after which he'll potentially have for connecting my application with other systems (like Google and Twitter).

The main problem of the implementation is that if the consumer connect through Facebook once, make use of the application without hooking up to others social layers, and then, connect themself via Google, the application will not recognize it is the same person and can produce a new account, on your own.

Also, It is possible the tables for that session (FacebookUser, GoogleUser, etc) and also the tables for that linked accounts could be different (maybe the token to gain access to the social networking and also the answer to make use of the application differs ?)

I curently have a session table like that one :

// Maybe I should add a new column for identifying from which type come the token (Local, Facebook, Google, etc)
Session(date, ip, token, user_id)

Do you consider this process is nice ? have you got a better one ?

Thanks ! greatly !