views:

52

answers:

1

Hey :)

I'm currently setting up a new users data model. Are the ids from facebook, twitter and openid all numerical? What is the length?

This is what i have so far:

table users

Thanks for any collection.

Oliver

+1  A: 

OpenID identities are strings (URLs). There is no such thing as "OpenID id".

As for twitter and facebook, they use OAuth, and use strings(access tokens) too.

Mewp
oh i see, how long can a OpenID url and OAuth strings be?
Oliver
There is no theoretical limit. As I've said, OpenID identities are URL-s, and an url can have arbitrary length. In practice however, 256 characters would be more than necessary. I don't know about OAuth strings, but I think they're similar. Maybe you should look at examples in your OAuth library?
Mewp
Since the tags indicate you're on PostgreSQL, you really should treat them as unlimited - use the "text" datatype. There's no drawback to it compared to varchar(nn), and since your datamodel doesn't have a limit, your implementation shouldn't.
Magnus Hagander