fb-auth 1.0.0.alpha3 → 1.0.0.alpha4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -2
- data/README.md +3 -9
- data/lib/fb/auth.rb +4 -1
- data/lib/fb/auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e834fa173991e96a411b5397cf5cfd06e09a8a9
|
4
|
+
data.tar.gz: 45922021401e2efff75eee882d8aaab52c1c65be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95a437673187c8885a2fe2450d413434656d67ef34d55dd0e25053c7fc1caf81c23f9419e8dd0c9b1dd88df07a7adfc50d9503a4d03bdd2d0a8630677575f67c
|
7
|
+
data.tar.gz: efcfe1fc78f2dbbd1d2be552886e91c2058dadfaffad21f43c4c3259cfcfb734b7c11fd63b9115ff36e66a16eaf4de29217fcbba1e29fc60bfc9409d34117347
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,19 @@ For more information about changelogs, check
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
8
8
|
|
9
|
-
## 1.0.0 - 2017/
|
9
|
+
## 1.0.0.alpha4 - 2017/12/18
|
10
|
+
|
11
|
+
* [ENHANCEMENT] Set scope as variable for `Fb::Auth#url`
|
12
|
+
|
13
|
+
## 1.0.0.alpha3 - 2017/08/31
|
14
|
+
|
15
|
+
* [FEATURE] Add Fb::Auth#revoke
|
16
|
+
|
17
|
+
## 1.0.0.alpha2 - 2017/07/25
|
18
|
+
|
19
|
+
* [ENHANCEMENT] Set scope `'email,pages_show_list,read_insights'` for `Fb::Auth#url`
|
20
|
+
|
21
|
+
## 1.0.0.alpha1 - 2017/07/24
|
10
22
|
|
11
23
|
This library was originally intended to provide methods to authenticate but
|
12
24
|
has grown to include other methods to configure, get posts, insights etc.
|
@@ -19,7 +31,7 @@ Most of those methods have been extracted into separate libraries.
|
|
19
31
|
## 0.1.3 - 2017/07/20
|
20
32
|
|
21
33
|
* [BUGFIX] Fixed `require` statement not loading for some classes.
|
22
|
-
* [BUGFIX] Fixed typo (it's client_secret
|
34
|
+
* [BUGFIX] Fixed typo (it's `client_secret`, not `client_id`)
|
23
35
|
|
24
36
|
## 0.1.2 - 2017/07/11
|
25
37
|
|
data/README.md
CHANGED
@@ -36,12 +36,12 @@ authenticate with their Facebook account in order to use your application:
|
|
36
36
|
|
37
37
|
```ruby
|
38
38
|
redirect_uri = 'https://example.com/auth' # REPLACE WITH REAL ONE
|
39
|
-
Fb::Auth.new(redirect_uri: redirect_uri).url
|
39
|
+
Fb::Auth.new(redirect_uri: redirect_uri, scope: ["manage_pages"]).url
|
40
40
|
# => https://www.facebook.com/dialog/oauth?client_id=...&scope=manage_pages&redirect_uri=https%3A%2F%2Fexample.com%2Fauth
|
41
41
|
```
|
42
42
|
|
43
|
-
Note that access is
|
44
|
-
|
43
|
+
Note that access is requested with permission to access email, manage pages,
|
44
|
+
read insights, et cetera. See https://developers.facebook.com/docs/facebook-login/permissions
|
45
45
|
|
46
46
|
Fb::Auth#access_token
|
47
47
|
---------------------
|
@@ -62,11 +62,6 @@ Fb::Auth.new(redirect_uri: redirect_uri, code: code).access_token
|
|
62
62
|
## Development
|
63
63
|
|
64
64
|
After checking out the repo, run `bin/setup` to install dependencies.
|
65
|
-
If you would like to run tests for Fb::Auth, please obtain a long-term access token that manages at least one page
|
66
|
-
and has permission to read your Facebook email (set scope to include `email`, `pages_show_list`, & `read_insights`). Then set the token as
|
67
|
-
as an environment variable:
|
68
|
-
|
69
|
-
export FB_TEST_ACCESS_TOKEN="YourToken"
|
70
65
|
|
71
66
|
Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
72
67
|
|
@@ -76,7 +71,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
76
71
|
|
77
72
|
Bug reports and pull requests are welcome on GitHub at https://github.com/Fullscreen/fb-auth. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
78
73
|
|
79
|
-
|
80
74
|
## License
|
81
75
|
|
82
76
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/fb/auth.rb
CHANGED
@@ -11,10 +11,13 @@ module Fb
|
|
11
11
|
# after they have completed the Facebook OAuth flow.
|
12
12
|
# @option [String] :code A single-use authorization code provided
|
13
13
|
# by Facebook OAuth to obtain an access token.
|
14
|
+
# @option [String] :refresh_token
|
15
|
+
# @option [Array<String>] :scope
|
14
16
|
def initialize(options = {})
|
15
17
|
@redirect_uri = options[:redirect_uri]
|
16
18
|
@code = options[:code]
|
17
19
|
@refresh_token = options[:refresh_token]
|
20
|
+
@scope = options[:scope]
|
18
21
|
end
|
19
22
|
|
20
23
|
# @return [Boolean] whether the authentication was revoked.
|
@@ -46,7 +49,7 @@ module Fb
|
|
46
49
|
{}.tap do |params|
|
47
50
|
params[:client_id] = Fb.configuration.client_id
|
48
51
|
params[:redirect_uri] = @redirect_uri
|
49
|
-
params[:scope] =
|
52
|
+
params[:scope] = Array(@scope).join(",")
|
50
53
|
end
|
51
54
|
end
|
52
55
|
|
data/lib/fb/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Dao
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fb-support
|