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
13
votes
8 answers

Circular dependency detected while autoloading constant User

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…
Bejan George
  • 176
  • 1
  • 1
  • 6
13
votes
5 answers

"omniauth-twitter" email id is not fetched from twitter in ruby on rails

i am using omniauth-twitter gem to enable Twitter login in my rails application. Here is my code ... gemfile - gem 'omniauth', '~> 1.1.1' gem 'omniauth-twitter' routes.rb - match '/auth/twitter/callback', to: 'users#twitter_login' match…
Free-Minded
  • 5,322
  • 6
  • 50
  • 93
13
votes
6 answers

Rails: Could not authenticate you from Facebook because "Invalid credentials"

I integrated omniauth-facebook using https://github.com/plataformatec/devise/wiki/OmniAuth%3a-Overview. But I am getting error of : Could not authenticate you from Facebook because "Invalid credentials". And in logs, getting this: Authentication…
user2206724
  • 1,265
  • 3
  • 20
  • 38
13
votes
3 answers

Editing Users With Devise and Omniauth

I'm working through the Railscast on implementing Devise and OmniAuth (along with the Devise documentation) -- currently, I've got a site going where visitors can sign up using their facebook accounts or by filling out a form. I'm running into…
Sam
  • 221
  • 3
  • 8
13
votes
4 answers

Devise/Omniauth failure: How to debug it?

After trying to "log in with Google", I'm seeing this error in the logs: Processing by Users::OmniauthCallbacksController#failure as HTML I can see all the data from google being sent through the URL (in the logs), including user email and name. So…
HappyDeveloper
  • 12,480
  • 22
  • 82
  • 117
12
votes
3 answers

Rails 3 - Devise With OmniAuth - Redirect after signing in goes to /users/sign_in

Im using devise with omniauth for signing in users with facebook. I want them to be redirected after signing in to the page they were on after before signing in. I've used the def after_sign_in_path_for(resource_or_scope) store_location =…
Philip
  • 6,827
  • 13
  • 75
  • 104
12
votes
1 answer

Setting up SAML callback in Rails using Devise and OmniAuth-SAML

EDIT: Additional info and condensed question near the bottom ;) I'm setting up integration between a small app I'm making and an identity provider using SAML2.0. In general, I've been following the instructions on the Devise page, and then on the…
a p
  • 3,098
  • 2
  • 24
  • 46
12
votes
5 answers

Rails 3 - Devise : How to skip the 'current_password' when editing a registration?

I've implemented omniauth with my devise model, so I can authenticate using other services. Password is not necessary anymore for my model, as users can authenticate using twitter, facebook... Everything is working fine, but, when an user try to…
Tiago
  • 2,966
  • 4
  • 33
  • 41
12
votes
4 answers

Getting error OmniAuth::NoSessionError with Rails 5 API

I created a new Rails 5 application with rails new appname --api which seems great! I want to use it as a backend to a frontend with React and in time a Chrome App. For now I want to create an API. I used the following gems gem 'omniauth' gem…
thecrentist
  • 1,241
  • 2
  • 19
  • 28
12
votes
2 answers

Devise/OmniAuth Override default callback url

I'm using Devise 3.5 with Omniauth in a Rails 4 app. I've created an integration with Facebook that allows a user to connect their Facebook account to my app. Currently when the user clicks the connect button, they're sent to /user/auth/facebook and…
Daniel Bonnell
  • 4,817
  • 9
  • 48
  • 88
12
votes
2 answers

Running Rails+Passenger+Devise from a subdirectory?

I have a server A which proxies all traffic on /rails to server B. So I setup this virtual host, and most things work...okay. link_to is broken and generates urls to /users as opposed to /rails/users, but I can work around that. If I set…
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
12
votes
1 answer

Rails API: Authenticate users from native mobile apps using username/password or facebook token

So I have been pulling my hair out for a few days now trying to figure out how to add username/password authentication to my rails mobile API. Here is a brief overview of my current authentication flow: User selects "login with Facebook" on the…
Jeremy Moyers
  • 353
  • 3
  • 12
12
votes
2 answers

Use separate authentication model with Devise on Rails

I have a simple solution I've made myself with the following objects: Account (has token field, that is returned when authenticating and used in API calls) Authentication (has auth_type/auth_id and reference to Account) I have a separate…
thejaz
  • 2,763
  • 2
  • 26
  • 40
12
votes
3 answers

devise/omniauth - The action 'facebook' could not be found

I'm trying to implement facebook authentication in my app following this guide I've followed all the steps but get the following error after hitting login. Unknown action The action 'facebook' could not be found for…
Finnnn
  • 3,530
  • 6
  • 46
  • 69
11
votes
4 answers

Rails rspec and omniauth (integration testing)

My Rails 3.2 app uses OmniAuth and Devise to sign in with Twitter. The authentication system works fine. I would like to write an integration test in rspec to make sure everything works. Using the information in the wiki, I've written the following,…
mehulkar
  • 4,895
  • 5
  • 35
  • 55