0
我安装设计& omniauth到认证介绍, 与Facebook登录后,我创建了一个用户,并为用户Rails的3-设计 - 登录错误使用Facebook登入后
user = User.new :fullname => auth_hash['extra']['raw_info']['name'],
:email =>auth_hash['extra']['raw_info']['email'],
:encrypted_password => Devise.friendly_token[0,20]
密码,但当我尝试与我的Facebook用户登录(://本地主机:HTTP 3000 /用户/ sign_in),我有一个错误:
BCrypt::Errors::InvalidHash in Devise::SessionsController#create
invalid hash
请求
参数:
{"utf8"=>"✓",
"authenticity_token"=>"/xA0goLirKlI2YWSLSMQk+3a8xDrVmrhqIjhILh0OME=",
"user"=>{"email"=>"[email protected]",
"password"=>"[FILTERED]",
"remember_me"=>"1"},
"commit"=>"Sign in"}
是的,我都试过了。 但导轨提出了另一个错误: 未知属性:密码 – ThanhLongVN
哦,这是我的愚蠢错误, 我补充说:database_authenticatable到user.rb模型,并全部解决 – ThanhLongVN
很高兴知道,很高兴你知道了。 –