Questions tagged [omniauth-twitter]

Questions about the Ruby gem containing the Twitter strategy for OmniAuth

30 questions
46
votes
1 answer

Callback redirect not preserving session

I have a scenario that works just fine when I am using real omniauth, but fails when I run it with the mock auth in cucumber/capybara. In the callback, when I do sign_in @user, it successfully creates the user and logs in... current_user is set.…
joshwa
  • 1,660
  • 3
  • 17
  • 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
6
votes
3 answers

No route matches [GET] "/auth/twitter" OmniA

I am not using devise or some other like-gem. I am very new to RoR. Here is my routes.rb # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html Rails.application.routes.draw do get "about", to:…
5
votes
4 answers

Devise Oauth Twitter: OAuth::Unauthorized Forbidden 403

I am trying to implement Oauth Twitter using Devise. I have created app on twitter I have set callback url to: http://localhost:3000 I have added this to config\initializers\devise.rb config.omniauth :twitter, "key", "key secret" Sign in with…
Stuxen
  • 708
  • 7
  • 21
4
votes
1 answer

Rails 4 - Devise Omniauth and allowing a single user to authenticate with multiple social media strategies

I am trying to make an app with Rails 4. I have been trying (for 3+ years) to figure out how to get Devise and Omniauth to works, so that users can add multiple social media accounts to their user profile. I've read all of the devise and omniauth…
Mel
  • 2,481
  • 26
  • 113
  • 273
3
votes
2 answers

rails wrong number of arguments (2 for 1) for user_signed_in? and current_user

I'm new in Rails and I have been stuck with this error for a few days. I have installed Devise and Facebook connect without a problem. I could sign in with Facebook but not with devise registration (this is not what caused this error message). I…
2
votes
1 answer

Rails - Devise - Twitter and Instagram are not redirecting to my callback url

I'm working on user authentication with social media using Devise and Omniauth. I added the following to my config/initializers/devise.rb: config.omniauth :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'], scope: 'public_profile,email',…
TamerB
  • 1,401
  • 1
  • 12
  • 27
2
votes
1 answer

RoR Twitter API oAuth : "Could not authenticate you."

I try to connect my app to the Twitter API. I am not sure but i think my problem come from the oauth_signature. So i read this documentation : https://dev.twitter.com/oauth/overview/creating-signatures I think i did everything like they say but…
2
votes
2 answers

Validation failed: Password can't be blank

I have an app, build on Rails 4.2 and tried to do twitter authentication, using RailsCasts #241 Simple OmniAuth. But have this issue: Validation failed: Password can't be blank! I searched answer everywhere, but did not find the…
Igor Ivancha
  • 3,413
  • 4
  • 30
  • 39
1
vote
0 answers

How do i access the data returned form ruby on rails omniauth-twitter gem after authentication

I have a separate registration and login system set up. I am building an app with omniauth2 with rails 6 to let users schedule tweets to post. I am using omniauth2 so users can authorize the application to access their accounts I want to get the…
1
vote
1 answer

Rails 6 heroku Precompiling assets failed

compile fail with rails and omniauth on heroku remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: rake aborted! remote: NoMethodError: undefined method `[]' for…
Joe Bloggos
  • 889
  • 7
  • 24
1
vote
0 answers

How to grab and display a twitter users followers list using twitter api - Ruby on Rails / omniauth-twitter

I have successfully integrated my application with omniauth and my twitter account. I was able to grab the name, provider, uID, location, avatar and URL for each user that logs in. But when I try to grab a list of the users followers I am not able…
Mark
  • 11
  • 1
1
vote
1 answer

How to get the auth URL from an OmniAuth provider without redirect

How do you get the URL that OmniAuth redirect to when you go to /auth/twitter? I am building an API server and just want to pass the URL in JSON to the client so it can do whatever it needs to with the URL. I think what I want is the result of the…
Peter Sankauskas
  • 2,882
  • 4
  • 27
  • 28
1
vote
1 answer

Error on migration: SQLite3::SQLException: no such table: main.users

I'm still pretty new to the Rails world. I've been working on a skill at a time so I thought I'd give Omni-Auth twitter a crack. I've been reading through this tutorial on SitePoint: Rails Authentication with OAuth 2.0 and OmniAuth I'm find up until…
0
votes
0 answers

Omniauth twitter callback page solution?

when i try to use that link http://localhost:3000/auth/twitter/callback facing this error def callback_phase # rubocop:disable MethodLength fail(OmniAuth::NoSessionError, "Session Expired") if session["oauth"].nil? request_token =…
1
2