omniauth

Problem with Routes using Devise and Omniauth

徘徊边缘 提交于 2020-01-01 03:35:06
问题 I am trying to get OAuth and Devise working together but I get Controller::RoutingError (No route matches "/users/auth/facebook/callback"): when trying to auth via Facebook. Weirdly, the problem doesn't happen with Google Apps. (same callback route). Any ideas? callback_controller: class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController def facebook # You need to implement the method below in your model @user = User.find_for_facebook_oauth(env["omniauth.auth"], current

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,

Devise omniauthable breaks Omniauth authentication with `Could not find a valid mapping for path`

蓝咒 提交于 2019-12-30 10:30:37
问题 In my project, I have two type of users: job seekers and hiring managers. Job seekers don't have a model, they are just able to apply for jobs using the data received from from third-party providers while authenticating thru Omniauth. Hiring managers' info is stored in devise User model. Hiring managers also must be able to sign in with their company's Google email account. So, first I built job seekers' authentication using Omniauth 1.0.0, Rails 3.1.3: omniauth.rb require 'omniauth-openid'

Rails facebook app returns 422 “ the change u wanted was rejected” error

≯℡__Kan透↙ 提交于 2019-12-30 05:20:12
问题 My facebook is just approved today. However,when I clicked on "Go to app", it returns Rail 422 " The change you wanted was rejected. error" I set my Canvas URL to my site url and I am using Omniauth, so I am just wondering what did I miss. 回答1: Try removing protect_from_forgery In the application_controller, or # you can disable csrf protection on controller-by-controller basis: skip_before_filter :verify_authenticity_token Facebook uses signed_request that you can decode and use to verify

omniauth OAuthException & OAuth::Unauthorized

痴心易碎 提交于 2019-12-30 04:37:21
问题 I have installed omniauth 1.0. Also I have oauth-0.4.5, oauth2-0.5.1, omniauth-facebook-1.0.0, omniauth-twitter-0.0.6. omniauth.rb Rails.application.config.middleware.use OmniAuth::Builder do provider :developer unless Rails.env.production? provider :facebook, ENV['167257285348131'], ENV['c8c722f697scb2afcf1600286c6212a9'], :scope => 'email,offline_access,read_stream', :display => 'popup' provider :twitter, ENV['fma2L22ObJCW52QrL7uew'], ENV['4aZfhCAOdiS7ap8pHJ7I1OZslFwVWWLiAMVpYUI'] end

Getting (omniauth-facebook) and (omniauth-twitter) work

假装没事ソ 提交于 2019-12-29 11:43:43
问题 I'm using: Ruby on Rails 4 devise 3.0.3 omniauth (1.1.4) omniauth-facebook (1.4.1) omniauth-twitter (1.0.0) I recently set up my omniauth-facebook and everything works fine. Now i want to add omniauth-twitter but somehow i mess things up, pretty bad. 1.) To set up my Omniauth-Facebook i did this (in a nutshell): gem 'omniauth' gem 'omniauth-facebook' 2.) Added the columns " provider " and " uid " to my User model. 3.) Next, i declared the provider in my config/initializers/devise.rb: require

when using OmniAuth in rails application why I always met Errno::ETIMEDOUT

送分小仙女□ 提交于 2019-12-25 11:54:56
问题 I have a rails dummy application, And I've add OmniAuth into my Gemfile. I've add <%= link_to "Sign in with Twitter", "/auth/twitter" %> in my application layout file. Also I've add the omniauth.rb file in my config\initializers folder. Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, 'MYKEY', 'MYSECERT' end After I restart of my rails server with rails s and visit http://localhost:3000/auth/twitter I've always met Errno::ETIMEDOUT , saying Operation timed out -

when using OmniAuth in rails application why I always met Errno::ETIMEDOUT

こ雲淡風輕ζ 提交于 2019-12-25 11:54:55
问题 I have a rails dummy application, And I've add OmniAuth into my Gemfile. I've add <%= link_to "Sign in with Twitter", "/auth/twitter" %> in my application layout file. Also I've add the omniauth.rb file in my config\initializers folder. Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, 'MYKEY', 'MYSECERT' end After I restart of my rails server with rails s and visit http://localhost:3000/auth/twitter I've always met Errno::ETIMEDOUT , saying Operation timed out -

Bundle install error with “omniauth-oauth2”

三世轮回 提交于 2019-12-25 04:56:08
问题 Running bundle install I get the following error (full trace: http://pastebin.com/Vp4nHc2p): Bundler could not find compatible versions for gem "omniauth-oauth2": In Gemfile: omniauth-facebook (~> 1.2.0) ruby depends on omniauth-oauth2 (~> 1.0.0) ruby omniauth-github (~> 1.0.1) ruby depends on omniauth-oauth2 (1.1.1) To see my Gemfile: http://pastebin.com/vMcHDHa8 Any idea how to solve it? 回答1: Hi you probably need to install omniauth facebook and github versions which accept the same version

Devise sign out not signing out

拟墨画扇 提交于 2019-12-25 03:01:47
问题 I'm having trouble signing out with devise. I am creating my signout link like this: <%= link_to "Sign out", destroy_user_session_path %> This was causing problems because the route could not be found so I added this to my routes.rb: get 'sign_out', :to => 'users/sessions#destroy', :as => :destroy_user_session Which does't cause any errors but also doesn't sign out, user_signed_in? still returns true. Any ideas? 回答1: try delete "logout" => "devise/sessions#destroy", :as => "logout" and <%=