omniauth-facebook

Rails 4.1.5 omniauth strong parameters

烂漫一生 提交于 2019-11-28 05:26:53
After upgrading Rails 4.1.4 to 4.1.5 i get errors with my facebook omniauth session everything was working fine since then. When i create a User Session i get an ActiveModel::ForbiddenAttributesError Route: match 'auth/:provider/callback', to: 'sessions#create', as: 'signin', via: :get Session#create controller: def create user = User.from_omniauth(env["omniauth.auth"]) session[:user_id] = user.id session[:user_name] = user.name redirect_to root_path end and a user model like this: def self.from_omniauth(auth) where(auth.slice(:provider, :uid)).first_or_create.tap do |user| user.provider ||=

Ruby on Rails Omniauth facebook doesn't return email

半腔热情 提交于 2019-11-28 03:39:37
问题 I have been trying for days to setup my Omniauth for facebook I don't know what am I doing wrong. I am not able to get the email of the user. The returned hash only contains the "name" and the "uid" not even "first_name" and "last_name" devise.rb: config.omniauth :facebook, "KEY", "SECRET" omniauth_callbacks_controller.rb: class OmniauthCallbacksController < Devise::OmniauthCallbacksController def facebook logger.info request.env["omniauth.auth"] @user = User.from_omniauth(request.env[

How to get rid of OpenSSL::SSL::SSLError

大兔子大兔子 提交于 2019-11-27 11:55:23
I am trying to authenticate users with Facebook using OmniAuth. Initially, it was working, but along the way it just stopped working and started to give me this error message: OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed The same code works well for Twitter and I can't seem to understand why it doesn't work for Facebook. I have looked online for help, but I haven't been successful. This is the link to the website I am building: http://www.bestizz.com/ And this url would give you the error message: http://www.bestizz.com

How to get rid of OpenSSL::SSL::SSLError

萝らか妹 提交于 2019-11-26 15:47:54
问题 I am trying to authenticate users with Facebook using OmniAuth. Initially, it was working, but along the way it just stopped working and started to give me this error message: OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed The same code works well for Twitter and I can't seem to understand why it doesn't work for Facebook. I have looked online for help, but I haven't been successful. This is the link to the website I am