tags:

views:

51

answers:

2

I have local table for user accounts

UserID(nvarchar),Password,email, lastname roles etc.

Now UserID is used in every child tables.I want to enable OPENID registration at the moment in my site , and will integrate local user registration functionality later.Should i Insert openid-claimidentifier into local user account (USERID column) or create separate table for openid. In case of creating separate table, I have no data for userid(i have not enabled local user registration).

kindly guide me.

Thanks.

A: 

Put OpenID identifier into another column on your user table

TFD
and what about USERID , should I programmtically generate it.UserID is foriegn key in other tables.
klusner
Sure, it's just an id, it's not important to anyone or to OpenID
TFD
+2  A: 

If you put the ClaimedIdentifier column into your users table, you can make UserID an "int IDENTITY" column so that the SQL server automatically generates the value since all you need is a unique number there. You can also drop your password column until you add user registration (if you choose to do so).

But if you create an OpenID table with a foreign-key to the Users table, then you can eventually allow your users to associate multiple OpenIDs to their one account, which helps them avoid problems if their Provider is temporarily down, or their account with their Provider suspended, etc.

StackOverflow, for example, takes the middle ground, allowing the user to associate at most two claimed identifiers with each account.

Andrew Arnott