Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Merged
merged 1 commit into from

3 participants

@fosrias

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?

@fosrias fosrias 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
@arunagw arunagw merged commit 4fe1753 into arunagw:master
@arunagw
Owner

Thanks for the Patch

@masterkain

What about force_login and sign_in options?

@fosrias

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.

@arunagw
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
Commits on Nov 25, 2011
  1. @fosrias

    Patch updating authorisation per Twitter authentication

    fosrias authored
    Prevents authorising from opening Allow prompt on every authentication attempt. See: https://dev.twitter.com/docs/api/1/get/oauth/authenticate
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/omniauth/strategies/twitter.rb
View
3  lib/omniauth/strategies/twitter.rb
@@ -5,7 +5,8 @@ module OmniAuth
module Strategies
class Twitter < OmniAuth::Strategies::OAuth
option :name, 'twitter'
- option :client_options, {:site => 'https://api.twitter.com'}
+ option :client_options, {:authorize_path => '/oauth/authenticate',
+ :site => 'https://api.twitter.com'}
uid { access_token.params[:user_id] }
Something went wrong with that request. Please try again.