Skip to content
This repository

Patch to fix always opening Allow dialogue when authorizing due to Twitter authentication change. #7

Merged
merged 1 commit into from over 2 years ago

3 participants

Mark W. Foster Arun Agrawal Claudio Poli
Mark W. Foster

Prevents authorising from opening Allow prompt on every authentication attempt. See:

https://dev.twitter.com/docs/api/1/get/oauth/authenticate

Discussion of the issue is here (and links in it): http://stackoverflow.com/questions/8251519/rails-omniauth-twitter-asking-for-app-authorization-each-time-user-logs-in/8262479#8262479

I have noted you removed this as a default. There is a lot of discussion and issues around this w/r to issues with authorization vs. authentication at this point, the default behaviour is always asking to authorize, even when done.

Have since noted this: https://dev.twitter.com/discussions/3290

It may be that this is a bug on omniauth side and an update on the gem README may be a good idea stating to temporarily set configuration as :client_options => {:authorize_path => '/oauth/authentication'}.

Thoughts?

Mark W. Foster Patch updating authorisation per Twitter authentication
Prevents authorising from opening Allow prompt on every authentication attempt. See: https://dev.twitter.com/docs/api/1/get/oauth/authenticate
39a0208
Arun Agrawal arunagw merged commit 4fe1753 into from November 24, 2011
Arun Agrawal arunagw closed this November 24, 2011
Arun Agrawal
Owner

Thanks for the Patch

Claudio Poli

What about force_login and sign_in options?

Mark W. Foster

Don't think sign_in is supported (at least I don't find it in the current Twitter Oauth docs). Per force_login, I haven't tried this, but I would presume on the config setup you would use :authorize_params => :force_login => true.

Arun Agrawal
Owner

I think I am going to revert this. See #13

As I use other twitter app using oauth i able to to SendDM using that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 24, 2011
Mark W. Foster Patch updating authorisation per Twitter authentication
Prevents authorising from opening Allow prompt on every authentication attempt. See: https://dev.twitter.com/docs/api/1/get/oauth/authenticate
39a0208
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  lib/omniauth/strategies/twitter.rb
3  lib/omniauth/strategies/twitter.rb
@@ -5,7 +5,8 @@ module OmniAuth
5 5
   module Strategies
6 6
     class Twitter < OmniAuth::Strategies::OAuth
7 7
       option :name, 'twitter'
8  
-      option :client_options, {:site => 'https://api.twitter.com'}
  8
+      option :client_options, {:authorize_path => '/oauth/authenticate',
  9
+                               :site => 'https://api.twitter.com'}
9 10
 
10 11
       uid { access_token.params[:user_id] }
11 12
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.