嘿,我正在看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 |