我将设计和omniauth设置为authen,用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://localhost:3000/users/sign_in) 登录时,出现错误:
BCrypt::Errors::InvalidHash in Devise::SessionsController#create
invalid hash
要求
参数:
{"utf8"=>"✓",
"authenticity_token"=>"/xA0goLirKlI2YWSLSMQk+3a8xDrVmrhqIjhILh0OME=",
"user"=>{"email"=>"xxx@gmail.com",
"password"=>"[FILTERED]",
"remember_me"=>"1"},
"commit"=>"Sign in"}