嘿,我正在看omniauth上的以下railscast,并想知道如果使用uid
是存储会话的正确方法。存储凭证令牌不是更安全吗?使用用户名或令牌来存储Facebook会话
http://railscasts.com/episodes/241-simple-omniauth
我有下面的架构,并希望能够从Facebook创建新用户。任何想法如何正确地做到这一点?
Column | Type | Modifiers
------------------------+-----------------------------+----------------------------------------------------
id | integer | not null default nextval('users_id_seq'::regclass)
first_name | character varying(255) |
last_name | character varying(255) |
email | character varying(255) |
created_at | timestamp without time zone | not null
updated_at | timestamp without time zone | not null
password_digest | character varying(255) |
remember_token | character varying(255) |
admin | boolean | default false
password_reset_token | character varying(255) |
password_reset_sent_at | timestamp without time zone |