omniauth-facebook

Latest omniauth-facebook gem breaks devise

拟墨画扇 提交于 2021-02-20 09:45:48
问题 ruby '2.6.3' gem 'rails', '~> 6.0.2', '>= 6.0.2.1' I'm using the latest omniauth-facebook and devise together Gemfile: gem 'devise' gem 'omniauth-facebook' Getting this error when starting the server: /versions/2.6.3/lib/ruby/gems/2.6.0/gems/devise-4.7.3/lib/devise/omniauth.rb:12:in `': You are using an old OmniAuth version, please ensure you have 1.0.0.pr2 version or later installed. (RuntimeError) The problem is that if I try to use older omniauth-facebook versions the server works but then

Latest omniauth-facebook gem breaks devise

对着背影说爱祢 提交于 2021-02-20 09:41:56
问题 ruby '2.6.3' gem 'rails', '~> 6.0.2', '>= 6.0.2.1' I'm using the latest omniauth-facebook and devise together Gemfile: gem 'devise' gem 'omniauth-facebook' Getting this error when starting the server: /versions/2.6.3/lib/ruby/gems/2.6.0/gems/devise-4.7.3/lib/devise/omniauth.rb:12:in `': You are using an old OmniAuth version, please ensure you have 1.0.0.pr2 version or later installed. (RuntimeError) The problem is that if I try to use older omniauth-facebook versions the server works but then

undefined local variable or method `flash' for #<Devise::OmniauthCallbacksController:0x007fb5d1741e48>

你。 提交于 2021-02-18 06:41:31
问题 I am building a Rails-API using Omniauth-facebook and Devise-token-auth with Angular and ng-token-auth for the frontend. However when logging in with facebook I am presented with the error: undefined local variable or method `flash' for #<Devise::OmniauthCallbacksController:0x007fd027a51e10> It seems omniauth automatically uses flash middleware however the rails-api doesn't include this and I have been unsuccessfully disabling the use of flash with omniauth. My configuration is as below:

How to do omniauth on wildcard subdomain

泄露秘密 提交于 2021-01-27 23:07:07
问题 I'm have omniauth working in my Rails app on the top level domain. Now I want to do it on any given subdomain (users each get their own subdomain assigned dynamically). I can't find a way to dynamically change the callback url on the fly with omniauth Leaving it as is, in the callback I can see the referrer and know which subdomain they came from, and log them in, but when I then redirect them to their subdomain they are logged out because the session was on the top level domain. I'm using

How to do omniauth on wildcard subdomain

倾然丶 夕夏残阳落幕 提交于 2021-01-27 21:48:33
问题 I'm have omniauth working in my Rails app on the top level domain. Now I want to do it on any given subdomain (users each get their own subdomain assigned dynamically). I can't find a way to dynamically change the callback url on the fly with omniauth Leaving it as is, in the callback I can see the referrer and know which subdomain they came from, and log them in, but when I then redirect them to their subdomain they are logged out because the session was on the top level domain. I'm using

Want to save facebook image into my rails app

佐手、 提交于 2021-01-01 07:16:40
问题 I am using ominauth to signup users in my rails app.i also have a basic signup option with email address also. So for both users i have to save upload user picture in my file system I have regular file upload for my email users but for FB users i want their pics to save in my disc so i can use same code and not use FB graph link while displaying. FB sends images in this format with graph API http://graph.facebook.com/100007619644580/picture?type=large How can i save that in my public folder

Rails 4.1.5 omniauth strong parameters

半城伤御伤魂 提交于 2020-01-09 09:02:56
问题 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

Omniauth-facebook login does not work

╄→尐↘猪︶ㄣ 提交于 2020-01-05 01:25:33
问题 I cloned example facebook integration this repo to see how the omniauth-facebook works. I setup my own app_id and app_secret from my facebook app. The problem is the facebook login doesn't works. It throws an error: "Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://" when I try login via facebook. Does anyone have error like this one? How to solve it? 回答1: It looks like Facebook enforces HTTPS by default, but

Omniauth-facebook login does not work

和自甴很熟 提交于 2020-01-05 01:23:24
问题 I cloned example facebook integration this repo to see how the omniauth-facebook works. I setup my own app_id and app_secret from my facebook app. The problem is the facebook login doesn't works. It throws an error: "Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://" when I try login via facebook. Does anyone have error like this one? How to solve it? 回答1: It looks like Facebook enforces HTTPS by default, but

omniauth-facebook cannnot get email address

谁说我不能喝 提交于 2020-01-01 02:40:34
问题 I created new Rails App and install Devise and omniauth-facebook gem. And setting my Facebook App, as testing environment. So, I logged in via facebook and signed up my new Rails app, but request.env did not contain email address.info. this is returned request.env['omniauth.auth'] { "provider" => "facebook", "uid" => "xxxxxxxxxxxx", "info" => { "name" => "xxxxxxx", "image" => "http://graph.facebook.com/xxx/picture" }, "credentials" => { "token" => "tokenstring", "expires_at" => xxxxxxxxx,