Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrating OpenID in web site without using Local Database User Registration

Tags:

openid

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.

like image 227
Zara_me Avatar asked Mar 10 '10 10:03

Zara_me


1 Answers

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.

like image 188
Andrew Arnott Avatar answered Nov 09 '22 08:11

Andrew Arnott