omniauth

Facebook NoAuthorizationError after passing signed_parameters manually

吃可爱长大的小学妹 提交于 2019-11-28 07:57:20
问题 I've had a lot of issues trying to get the client-side login to work, so I'm going to take the liberty of referencing a ton of other questions here... none have resulted in an answer that has worked for me. CONTEXT Server-side login works fine Client-side login using JS SDK works fine on Safari* (have not tested in Firefox or IE or mobile non-Chrome), but not in Chrome , which is what this question is about (and majority of my users use Chrome so it's super important) Gem versions: ruby (2.1

How can I add localhost:3000 to Facebook App for development

蹲街弑〆低调 提交于 2019-11-28 05:49:53
I am working on a Rails 4 app. On my laptop, development is done at localhost:3000 . The actual domain of the site is roomidex.com . How can I set up a Facebook app so it works on production and development? Here is the current configuration: App Domains: roomidex.com Website With Facebook Login: Site URL: http://www.roomidex.com When I try to do a Facebook login on localhost:3000, I get this not surprising error: { "error": { "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.", "type": "OAuthException", "code": 191 } } On the Facebook App page, click

Facebook token expiration and renewal, with Koala and omniauth-facebook

无人久伴 提交于 2019-11-28 03:42:59
I'm writing a Rails app that uses omniauth-facebook to authenticate the user against FB (and to get a FB OAuth access token for the user). The app then uses Koala to make various calls to the FB Graph API, using that saved OAuth token. I update the saved token each time the user re-authenticates (typically when they log in to my app). Even so, that saved token will expire (or otherwise become invalid) from time to time. What's the best practice around guarding against auth failures and updating the token while using Koala? Should all calls be wrapped in begin/rescue blocks, with an exception

Rails 4, Devise, Omniauth (with multiple providers)

元气小坏坏 提交于 2019-11-28 03:21:12
I have spent days watching the RailsCasts on devise and omniauth and then going through related tutorials for setting up an authentication system that uses these gems. I think the RailsCasts are out of date and trying to patch the gaps with other tutorials is creating all kinds of issues. Please can anyone suggest a current tutorial that I can use as a basis for implementing this system. I have separate user and authentications models (with users having many authentications). I'd really like to use devise and omniauth (with CanCan for abilities) on rails 4 but am tearing my hair out in trying

Circular dependency detected while autoloading constant User

别说谁变了你拦得住时间么 提交于 2019-11-28 00:49:06
I've followed this tutorial ( http://railscasts.com/episodes/236-omniauth-part-2 ) for creating facebook login with OmniAuth and Devise and I get this error: Circular dependency detected while autoloading constant User in my routes.rb devise_for :users , :controllers => {:registrations => 'registrations'} registrations_controller.rb Class RegistrationsController < Devise::RegistrationsController def create super session[:omniauth] = nil unless @user.new_record? end private def build_resource(*args) super if session["devise.omniauth"] @user.apply_omniauth(session["devise.omniauth"]) session[

OmniAuth Google OpenID WEBrick::HTTPStatus::RequestURITooLarge

最后都变了- 提交于 2019-11-27 23:15:51
问题 I am using OmniAuth to allow users to log in with their Google OpenID accounts. When I try to log in in development mode with WEBrick, I get a WEBrick::HTTPStatus::RequestURITooLarge error. When I deploy it to my rails host, it works fine. Is there a different web server I should use instead of WEBrick? 回答1: Strange, I wonder what the URI length limit is for WEBrick. You could try thin http://code.macournoyer.com/thin/. I use this locally for development sometimes and it seems to work great.

#_=_ added to URL by facebook

三世轮回 提交于 2019-11-27 21:25:33
After connecting to my Rails app via Facebook I have #_=_ added on to my URL. I tried specifying a redirect_uri as specified by FB but it didn't work. Javascript workaround to remove the symbols doesn't help. I tried everything with no results. Any pointers on how to solve this? My setup: gem 'rails', '3.0.11' gem "devise", '1.5.2' gem "omniauth", '1.0.1' gem 'omniauth-facebook', '1.0.0rc2' module Facebook CONFIG = YAML.load_file(Rails.root.join("config/facebook.yml"))[Rails.env] FB_APP_ID = CONFIG['app_id'] FB_APP_SECRET = CONFIG['secret_key'] end Rails.application.config.middleware.use

Omniauth-facebook keeps reporting invalid_credentials

南笙酒味 提交于 2019-11-27 19:42:25
I am trying to implement omniauth-facebook as described in Railscast #360 and have run into quite a roadblock. When I click on the signin link, I get the desired popup asking me to input my facebook credentials, but when I submit, I get an OmniAuth::Strategies::OAuth2::CallbackError error. In the apache logs, this is printed: (facebook) Authentication failure! invalid_credentials: OmniAuth::Strategies::OAuth2::CallbackError, OmniAuth::Strategies::OAuth2::CallbackError here is the relevant code: omniauth.rb OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth:

Devise and OmniAuth remembering OAuth

橙三吉。 提交于 2019-11-27 18:35:49
So, I just got setup using Rails 3, Devise and OmniAuth via https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview . I'm successfully authenticating users via Facebook, but they are not "rememberable" despite being marked with: devise [...]: rememberable, :omniauthable I tried calling: @the_user.remember_me! ...to no avail. No cookie is being stored/set which means the user does not persist across sessions. Has anybody managed to get a user sourced from FB remembered via cookies? In my mind, this should be happening automatically. Thanks for any ideas or feedback you guys might have.

Oauth2 Instagram API “redirect URI does not match registered redirect URI”

别说谁变了你拦得住时间么 提交于 2019-11-27 14:55:48
问题 I am working on a Rails application which is in development mode and it can register with omniauth. The host is http://localhost:3000/ I'm using the gems: gem 'omniauth' gem 'omniauth-foursquare' gem 'omniauth-instagram' When I register through omniauth with Foursquare there's no problem at all. All the settings are right and my redirect_uri in the Foursquare developer settings equals to the host (localhost:3000) However, if I fill in the exact same redirect_uri (localhost:3000) in the