robdimarco_authlogic_oauth2 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/lib/authlogic_oauth2/session.rb +6 -1
- data/lib/authlogic_oauth2/version.rb +1 -1
- data/robdimarco_authlogic_oauth2.gemspec +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -46,6 +46,7 @@ Here's an example for Facebook:
|
|
46
46
|
oauth2_client_secret "APPLICATION_SECRET"
|
47
47
|
oauth2_site "https://graph.facebook.com"
|
48
48
|
oauth2_scope "offline_access,email,user_birthday"
|
49
|
+
oauth2_cannot_find_record_message "We have no record of you in our database, please sign up first."
|
49
50
|
end
|
50
51
|
|
51
52
|
It's important to note here that if you don't request offline_access permissions from your OAuth2 provider the access token will expire either at a specific time or upon logout from the provider itself. Some providers allow refresh tokens to be issued, but some (Facebook, for example) does not. Refresh token handling hasn't been implemented in authlogic_oauth2 yet, so make sure you request offline_access.
|
@@ -44,6 +44,11 @@ module AuthlogicOauth2
|
|
44
44
|
rw_config(:oauth2_scope, value, '')
|
45
45
|
end
|
46
46
|
alias_method :oauth2_scope=, :oauth2_scope
|
47
|
+
|
48
|
+
def oauth2_cannot_find_record_message(value = nil)
|
49
|
+
rw_config(:oauth2_cannot_find_record_message, value, "Could not find user in our database, have you registered with your Oauth2 account?")
|
50
|
+
end
|
51
|
+
alias_method :oauth2_cannot_find_record_message=, :oauth2_cannot_find_record_message
|
47
52
|
end
|
48
53
|
|
49
54
|
module Methods
|
@@ -92,7 +97,7 @@ module AuthlogicOauth2
|
|
92
97
|
end
|
93
98
|
|
94
99
|
if !attempted_record
|
95
|
-
errors.add(:base,
|
100
|
+
errors.add(:base, self.class.oauth2_cannot_find_record_message)
|
96
101
|
end
|
97
102
|
end
|
98
103
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robdimarco_authlogic_oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 4
|
10
|
+
version: 1.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Hite
|