omniauth-twitter 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -0
- data/lib/omniauth-twitter/version.rb +1 -1
- data/lib/omniauth/strategies/twitter.rb +5 -0
- metadata +4 -4
data/README.md
CHANGED
@@ -28,6 +28,10 @@ To use this, just add a querystring for screen_name.
|
|
28
28
|
|
29
29
|
/auth/twitter?screen_name=scottw
|
30
30
|
|
31
|
+
You can also specify ```force_login``` without specifying the screen_name to prompt the user to choose the twitter account they wish to use.
|
32
|
+
|
33
|
+
/auth/twitter?force_login=true
|
34
|
+
|
31
35
|
Twitter also optionally supports specifying a x_auth_access_type when authenticating. This is handy when you need to specify special permission in some cases.
|
32
36
|
|
33
37
|
To use this, just add a querystring for x_auth_access_type.
|
@@ -37,8 +37,13 @@ module OmniAuth
|
|
37
37
|
alias :old_request_phase :request_phase
|
38
38
|
|
39
39
|
def request_phase
|
40
|
+
force_login = session['omniauth.params'] ? session['omniauth.params']['force_login'] : nil
|
40
41
|
screen_name = session['omniauth.params'] ? session['omniauth.params']['screen_name'] : nil
|
41
42
|
x_auth_access_type = session['omniauth.params'] ? session['omniauth.params']['x_auth_access_type'] : nil
|
43
|
+
if force_login && !force_login.empty?
|
44
|
+
options[:authorize_params] ||= {}
|
45
|
+
options[:authorize_params].merge!(:force_login => 'true')
|
46
|
+
end
|
42
47
|
if screen_name && !screen_name.empty?
|
43
48
|
options[:authorize_params] ||= {}
|
44
49
|
options[:authorize_params].merge!(:force_login => 'true', :screen_name => screen_name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-twitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -140,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
segments:
|
142
142
|
- 0
|
143
|
-
hash:
|
143
|
+
hash: -1473078511360950658
|
144
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
145
|
none: false
|
146
146
|
requirements:
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
segments:
|
151
151
|
- 0
|
152
|
-
hash:
|
152
|
+
hash: -1473078511360950658
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project: omniauth-twitter
|
155
155
|
rubygems_version: 1.8.23
|