开发者

How to store open id's in database?

开发者 https://www.devze.com 2023-04-10 20:05 出处:网络
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 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

精彩评论

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