Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails omniauth - twitter asking for app authorization each time user logs in

In Railscast: http://railscasts.com/episodes/241-simple-omniauth Ryan uses omniauth for logins. In the video when he clicks on the login button the first time Twitter asks the user if they would like to authorize Ryan's app. The second time the login button is clicked it automatically logs the user in. In my application, the user is forced to authorize my app each time. If the user is logged into twitter and has already authorized the app, then shouldn't it "just work"?

EDIT: my app currently has Read, write, and direct message permissions. I'm also using omniauth-twitter (0.0.6).

like image 515
LDK Avatar asked Nov 24 '11 02:11

LDK


1 Answers

Adding a non-rails answer here.

Just be sure to check in the twitter settings for your app that the "Allow this application to be used to Sign in with Twitter" checkbox is selected. Otherwise Twitter will always redirect you to the authorize page instead of authenticate.

I spend 45 minutes troubleshooting the rails app before finally checking the twitter settings, hopefully this will save someone some time.

like image 135
Jason Logsdon Avatar answered Oct 21 '22 00:10

Jason Logsdon