omniauth

Devise sign out not signing out

◇◆丶佛笑我妖孽 提交于 2019-12-25 03:01:31
问题 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 <%=

Omniauth error: No route matches [GET] “/auth/facebook”

会有一股神秘感。 提交于 2019-12-25 02:29:56
问题 My app was working fine three weeks ago, but upon returning to work on it I am getting this error after attempting to log in via Facebook: No route matches [GET] "/auth/facebook" Not sure what's going on. I've looked at Stackoverflow but found only help related to the Devise gem. NOTE: I am not using the Devise gem. My app is on Ruby 2.0 and Rails 4 My gemlock file is showing these versions of omniauth: oauth2 (0.8.1) faraday (~> 0.8) httpauth (~> 0.1) jwt (~> 0.1.4) multi_json (~> 1.0) rack

Facebook App using Devise is redirecting away from FB Canvas

巧了我就是萌 提交于 2019-12-25 02:15:37
问题 When the user installs my facebook app for the first time, a facebook logo is displayed, permissions are requested, and then the user is popped out of the iframe. I applied the directions recently (Oct 14th) added to the OmniAuth Overview wiki page on the devise site regarding lost sessions. And this has fixed all my redirect issues except when the permissions dialog shows up. Anyone else seeing this? Any idea how to fix? Help! 回答1: Figured it out on my own. The OmniAuth Overview wiki page

Can Facebook Omniauth email address be securely trusted?

孤街醉人 提交于 2019-12-25 02:07:02
问题 I have a traditional Devise user authentication system that simple uses email and password to login. I want to add login with Facebook. I have this mostly working, but I am curious about the security implications of handling an edge case. Let's say this stuff here happens: User is currently unauthenticated, but has an existing account with email "foo@bar.com" User clicks "Login with Facebook", authorizes access from Facebook Facebook calls back to my server showing email as "foo@bar.com" At

Is the news.reads action on the Open Graph available yet?

给你一囗甜甜゛ 提交于 2019-12-25 00:48:25
问题 I'm having the same issue as described in this post: How to get the built in news.reads action to publish to Facebook? I noticed this question was posted way back in October. Is this feature still in beta or is it available now? If it's still in Beta, any idea when it will be released? 回答1: This was released on January 18th, 2012 http://developers.facebook.com/blog/post/634/ 来源: https://stackoverflow.com/questions/8412612/is-the-news-reads-action-on-the-open-graph-available-yet

omniauth with rails: get facebook user's information

泪湿孤枕 提交于 2019-12-24 09:16:22
问题 in the callback of the authentication process I do: auth_hash = request.env['omniauth.auth'] and then, I'm extracting the user id, but is it possible in the same time getting the user's name and email address? 回答1: You need to first get the raw data from request.env["omniauth.auth"] data = request.env["omniauth.auth"].extra.raw_info username = data.first_name email = data.email 回答2: yesss u can get it by doing auth_hash[:info][:name] for name and auth_hash[:info][:email] for email 来源: https:/

A before_filter for Omniauth Facebook?

戏子无情 提交于 2019-12-24 06:45:58
问题 For devise there is a very easy to use Before_filter to use in the controllers. For some reason I can't get this to work for the Omniauth_facebook Gem. I followed the Railscast on Facebook Omniauth and also before_filter :authenticate def authenticate redirect_to :login unless User.find_by_provider_and_uid(auth["provider"], auth["uid"]) end end but I get an error: NameError in PostsController#new undefined local variable or method `auth' for #<PostsController:0x007f9fbfa7ee58> Any thoughts?

SSL Error OmniAuth in Ruby on Rails

坚强是说给别人听的谎言 提交于 2019-12-24 06:44:53
问题 I've read a lot about this error especially in OmniAuth for Rails 3. I have a few questions because currently I'm stuck on it. The consensus in this post was that it couldn't reference the certs properly. My first question is this (I'm using Windows 7 to preface the question): Where exactly in my hard drive would I begin to look to find the certs? I used RailsInstaller to install Rails 3 and the only thing that I can find that is close to that location is in "Git" where there is a "cert"

Rails - Strategies for avoiding OmniAuth and sharing computer risks

半城伤御伤魂 提交于 2019-12-24 05:06:08
问题 While testing Omniauth and following the popular Ryan Bates' videos, I thought that there is a major security hole. Here is an example I have two users: Aurelien and John John in the morning logs in onto twitter but forgets to log out. Then he goes on myapplication and connects to the Twitter service through the http://myapplication.com/auth/twitter. He is automatically assigned to a Twitter Authentication, because Twitter remembers that John was logged in. John goes to work. Meanwhile his

Rails3 omniauth google authentication on Returns User Identity

人走茶凉 提交于 2019-12-24 01:04:30
问题 My Omniauth integration works on local development but fails for google on staging. require 'omniauth/openid' require 'openid/store/memcache' Rails.application.config.middleware.use OmniAuth::Builder do OmniAuth.config.full_host = "http://xx.xx.xxx/" # dedicated openid provider :open_id, OpenID::Store::Memcache.new(Dalli::Client.new), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id' end I get a this error message: Started GET "/auth/failure?message=invalid_credentials