Questions tagged [omniauth]

OmniAuth is a flexible Ruby authentication library that standardizes multi-provider authentication for web applications

OmniAuth is a flexible authentication system for Ruby applications utilizing Rack middleware, such as Rails applications. It supports a large number of external authentication providers, such as Facebook, Google, and Twitter.

2360 questions
18
votes
2 answers

Rails: OAuth::Unauthorized 401 Authorization Required using OmniAuth-Twitter

I have implemented several different strategies found in StackOverFlow, but so far, none seem to affect the error being thrown: OAuth::Unauthorized 401 Authorization Required I am following Ryan Bates' RC #241 and get to the point where I click…
Matteo
  • 1,136
  • 1
  • 16
  • 36
18
votes
10 answers

Oauth2 Instagram API "redirect URI does not match registered redirect URI"

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…
Biketire
  • 2,019
  • 1
  • 23
  • 41
18
votes
6 answers

OmniAuth Strategies Facebook NoAuthorizationCodeError (must pass either a `code` parameter or a signed request (via `signed_request` parameter):

I am getting a error: OmniAuth::Strategies::Facebook::NoAuthorizationCodeError (must pass either a `code` parameter or a signed request (via `signed_request` parameter or a `fbsr_XXX` cookie)): Its not coming all the time. Its coming once in a…
Mohit Jain
  • 43,139
  • 57
  • 169
  • 274
18
votes
4 answers

Skip email validation for omniauth-twitter on devise 2.0

I'm using devise 2.0 and gem omniauth-twitter The problem is that twitter does not send an email in response, so the model user of my application validates that there is an email and I get the following error in the callback: Email can't be blank I…
hyperrjas
  • 10,666
  • 25
  • 99
  • 198
17
votes
1 answer

Rails: retrieving image from Facebook after Omniauth login with Devise

I setup Facebook login with Devise and omniauth with these instructions https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview The Devise wiki gives some instructions for getting facebook info from the hash stored in this variable…
Leahcim
  • 40,649
  • 59
  • 195
  • 334
17
votes
5 answers

OmniAuth Google OpenID WEBrick::HTTPStatus::RequestURITooLarge

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…
Shlomo Zalman Heigh
  • 3,968
  • 8
  • 41
  • 71
17
votes
8 answers

No 'Access-Control-Allow-Origin' header is present on the requested resource

I am using omniauth-facebook with AngularJS and CORS is not working correctly . My omniauth.rb is Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook,"xxxxx", "xxxxx", :scope => 'email,user_birthday,read_stream',…
harshit
  • 7,925
  • 23
  • 70
  • 97
17
votes
12 answers

Devise, OmniAuth & Facebook: "Not found. Authentication passthru."

Trying to follow along with https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview and I'm stumped. I've got config.omniauth :facebook, ENV['FB_APP_ID'], ENV['FB_APP_SECRET'] in my config/initializers/devise.rb, devise_for :users,…
orbiteleven
  • 951
  • 1
  • 11
  • 21
17
votes
5 answers

Getting "Error: redirect_uri_mismatch" with google_oauth2

The URL's seem right (Last updated them yesterday): The files too: omniauth.rb: provider :google_oauth2, 'MY_CLIENT_ID.apps.googleusercontent.com', 'MY_CLIENT_SECRET', :scope => 'https://mail.google.com/mail/feed/atom/' Error:…
alexchenco
  • 53,565
  • 76
  • 241
  • 413
17
votes
4 answers

Callback denied with OmniAuth

When I initiate the logging in process using OmniAuth in a Rails 3 app, if I cancel on the provider's page, I get sent back to an URL that looks something like: http://example.com/auth/twitter/callback?denied=aUho.... and my application throws a…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
16
votes
0 answers

Stuck in redirect loop for google oauth 2 using application owner account

I cant login to a website using google oauth. I have multiple gmail accounts and all seem to work fine but when I try to login through application owner account. It doesnt let me login and keeps me redirecting to the account selection UI. After…
AMBasra
  • 969
  • 8
  • 24
16
votes
1 answer

How to turn a Rails app with Devise into an OAuth provider?

I have a Rails application with admin accounts using Devise for authentication. I am creating a second application and would like to authenticate using the first application instead of duplicating admin accounts in the second application. So my idea…
Andrew
  • 227,796
  • 193
  • 515
  • 708
16
votes
1 answer

How to Test Facebook Login Action with Rails, Omniauth and Rspec

I asked a similar question before but I think I've gotten past my original error. Anyway I have a new fun failure that I'm having a blast trying to figure out (note the sarcasm). Here's my failure: 1) SessionsController#facebook_login should be…
freddyrangel
  • 1,353
  • 1
  • 11
  • 20
16
votes
7 answers

Devise Omniauth undefined method omniauth_authorize_path

I've noticed that when logging to Devise I have started to receive these error message. I'm using Devise 2.2.4 with Omniauth 1.1.4 and Omniauth-Facebook 1.4.1 Does anybody know what is the cause of this error? ActionView::Template::Error…
kambi
  • 3,291
  • 10
  • 37
  • 58
15
votes
4 answers

Facebook app - login through omniauth - OAuthException 191

I am facing with the problem: "error": { "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.", "type": "OAuthException", "code": 191 } I set up in my app the needed keys and tokens, in…
user984621
  • 46,344
  • 73
  • 224
  • 412