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
27
votes
4 answers

OmniAuth: Guarding against multiple accounts for the same user

I have a couple of Rails apps I'm looking to integrate with OmniAuth, but there is a conceptual problem I'm having with it that I'd like to figure out first. Consider the following scenario: Your application, Foo, supports OmniAuth logins via…
Jimmy
  • 35,686
  • 13
  • 80
  • 98
27
votes
2 answers

Routing Error uninitialized constant Users

I am a rails newbie... I am trying to set up Sign in with facebook for a demo app. I am using OmniAuth and following this tutorial https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview I get this error when redirecting to fB: Routing…
amit modi
  • 1,098
  • 1
  • 11
  • 26
26
votes
7 answers

Omniauth-twitter with Rails 5 stopped working! OAuth::Unauthorized 403 Forbidden

Everything was working fine and Omniauth has stopped working suddenly. I didn't make any code changes. I checked Twitter Apps Settings: I have callback url to my main production url, and Callback URL Locked to No. All keys are correct. Any idea?…
Designer
  • 1,061
  • 1
  • 12
  • 26
24
votes
3 answers

Rails 4, Devise, Omniauth (with multiple providers)

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…
Mel
  • 2,481
  • 26
  • 113
  • 273
24
votes
2 answers

OpenSSL::SSL::SSLError on Heroku

I'm trying to authenticate a user via Facebook or Twitter, get them to fill out their information, and then click save (thus creating a user record). I'm getting an OpenSSL error on that final step -- after clicking save. This happens at the Devise…
varatis
  • 14,494
  • 23
  • 71
  • 114
23
votes
3 answers

Rails Devise OmniAuth Facebook Login from iOS

I've been searching for a solid solution to this problem, and came across this SO question which kind of matches my predicament, but not exactly. Currently I have my iPhone application authenticating with my Rails API via Basic Auth. It's just…
Andrew K
  • 1,571
  • 1
  • 17
  • 25
23
votes
1 answer

difference between OAuth2 and Omniauth

I've read a lot about Omniauth and OAuth2, and how Omniauth uses OAuth, but I don't really understand what is the aim for each one. For example, I know that with Omniauth I can get back sent params with @auth['omniauth.params'] but if I'm using…
Fran Martinez
  • 2,994
  • 2
  • 26
  • 38
23
votes
4 answers

get user profile large picture from facebook with omniauth in devise 2.0

I want get the user profile large or normal picture from facebook. Now I get the square version from user profile picture with this code: :image => access_token.info.image # http://graph.facebook.com/id/picture?type=square How can I get the large…
hyperrjas
  • 10,666
  • 25
  • 99
  • 198
22
votes
5 answers

Omniauth Facebook authentication on localhost

I am trying to set up Omniauth as described in this Railscast. While it works with Twitter, I am unable to get it working with Facebook. I also set up 'http://localhost:3000' as siteurl and 'localhost' as domain but still see the following error…
Ryan Foster
  • 297
  • 1
  • 2
  • 10
22
votes
4 answers

"CSRF detected" with Omniauth and Google

I'm getting this OmniAuth::Strategies::OAuth2::CallbackError at /auth/google/callback csrf_detected | CSRF detected My code: require 'sinatra' require "sinatra/json" require "sinatra/config_file" require 'omniauth-oauth2' require…
Joseph Le Brech
  • 6,541
  • 11
  • 49
  • 84
22
votes
3 answers

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

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…
Steve Bourne
  • 951
  • 8
  • 19
20
votes
1 answer

Setup multiple providers with devise :omniauthable

I just got "Devise 1.2 supports integration with OmniAuth tutorial" working but I'd like to setup multiple providers to refer the same user. I'm looking for some good sample code to look at. I'm also not sure "multiple providers" is possible with…
Luca G. Soave
  • 12,271
  • 12
  • 58
  • 109
20
votes
8 answers

Which Ruby gems support the Facebook API?

I have a rails application using the Facebook API. I've seen several different Ruby gems for integrating with Facebook, but they look dated. Is it best to write low-level calls myself? Is there a decent and current gem available? Have any of these…
Kevin Bedell
  • 13,254
  • 10
  • 78
  • 114
19
votes
2 answers

What does ":event => :authentication" do?

This is actually a pretty simple question but I can't seem to find the answer. In the Omniauth Overview on Github, there is actually an explanation but I don't get it: We pass the :event => :authentication to the sign_in_and_redirect method to force…
Ashitaka
  • 19,028
  • 6
  • 54
  • 69
18
votes
4 answers

Devise and OmniAuth remembering OAuth

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 [...]:…
Eric Hanson
  • 185
  • 1
  • 6