开发者

How to store open id's in database?

I am working on the login system of my next website, and I want to integrate th开发者_开发知识库e possibility to log in with a facebook account (and in future probably other openID providers).

I am curious what is the best way to store openID's.

My idea is:

id: INT, AUTO_INCREMENT
user_id: INT
network: varchar(2) (fb - Facebook, tw - Twitter, etc.) (2 bytes)
network_id: INT (4 bytes)

But are really all network id's INTEGERs? Is there a better way?


I'm not sure about twitter, but userID in facebook is integer, so far the longest i've seen was 15 numbers, so you'd probably need BIGINT

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜