devise_oauth2_facebook 0.1.47 → 0.1.48
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
CHANGED
@@ -35,4 +35,4 @@ Create a migration file to add the columns:
|
|
35
35
|
add_column :users, :facebook_token, :string
|
36
36
|
|
37
37
|
Finally, update your view to include "Login with facebook" link:
|
38
|
-
<%= link_to "Login with facebook",
|
38
|
+
<%= link_to "Login with facebook", user_fb_auth_path %>
|
@@ -3,7 +3,7 @@ class Devise::FacebookConsumerController < ApplicationController
|
|
3
3
|
include DeviseOauth2Facebook::FacebookConsumerHelper
|
4
4
|
|
5
5
|
def auth
|
6
|
-
url = send("
|
6
|
+
url = send("#{resource_name}_fb_callback_url".to_sym)
|
7
7
|
redirect_to facebook_client.authorization.authorize_url(:redirect_uri => url , :scope => Devise.facebook_permissions)
|
8
8
|
end
|
9
9
|
|
@@ -19,7 +19,7 @@ class Devise::FacebookConsumerController < ApplicationController
|
|
19
19
|
# sign_in_and_redirect(resource_name, User.first)
|
20
20
|
# set_flash_message :notice, :signed_in
|
21
21
|
# return
|
22
|
-
url = send("
|
22
|
+
url = send("#{resource_name}_fb_callback_url".to_sym)
|
23
23
|
|
24
24
|
client = facebook_client
|
25
25
|
client.authorization.process_callback(params[:code], :redirect_uri => url)
|
@@ -3,9 +3,9 @@ ActionDispatch::Routing::Mapper.class_eval do
|
|
3
3
|
protected
|
4
4
|
|
5
5
|
def devise_facebook_consumer(mapping, controllers)
|
6
|
-
scope mapping.
|
7
|
-
get mapping.path_names[:fb_auth], :to => "#{controllers[:facebook_consumer]}#auth", :as => :
|
8
|
-
get mapping.path_names[:fb_callback], :to => "#{controllers[:facebook_consumer]}#callback", :as => :
|
6
|
+
scope mapping.fullpath do
|
7
|
+
get mapping.path_names[:fb_auth], :to => "#{controllers[:facebook_consumer]}#auth", :as => :fb_auth
|
8
|
+
get mapping.path_names[:fb_callback], :to => "#{controllers[:facebook_consumer]}#callback", :as => :fb_callback
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_oauth2_facebook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 123
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 48
|
10
|
+
version: 0.1.48
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mooktakim Ahmed
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-17 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,10 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 17
|
30
30
|
segments:
|
31
|
-
-
|
32
|
-
|
31
|
+
- 1
|
32
|
+
- 1
|
33
|
+
- 1
|
34
|
+
version: 1.1.1
|
33
35
|
type: :runtime
|
34
36
|
version_requirements: *id001
|
35
37
|
- !ruby/object:Gem::Dependency
|