john
john

Reputation: 35400

Do I store openid AND oauth tokens in same table or separate tables?

For example:

openid
------
id
user_id
provider
url

oauth
-----
id
user_id
provider
token
secret

OR:

identities
----------
id
user_id
provider
token (token here is oauth token or openid_url)
secret (nullable)

The bottom one bothers me even though it's easier because secret is dependent upon token

Thoughts?

Upvotes: 0

Views: 271

Answers (1)

Eran Hammer
Eran Hammer

Reputation: 7216

The two protocols are completely different, have different security properties, and should not be combined.

Upvotes: 2

Related Questions