omniauth-singly 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -27,6 +27,19 @@ You can authorize many services through Singly. Link to
27
27
  To see what services are supported, check the [Service
28
28
  Overview](https://singly.com/docs/services_overview).
29
29
 
30
+ ## Connecting multiple profiles
31
+
32
+ To connect a second (or Nth) profile to an existing account, include the user's
33
+ Singly `access_token` in the auth URL. Use this when, for example, the user has
34
+ logged in with Facebook and wants to also connect Twitter. If an `access_token`
35
+ is not included, no profile merging will _ever_ take place—either a new account
36
+ will be created or the user will log in to an existing account.
37
+
38
+ /auth/singly?service=<service>&access_token=<token>
39
+
40
+ For more details, see the [authorization
41
+ documentation](https://singly.com/docs/authorization).
42
+
30
43
  ## Scope
31
44
 
32
45
  Custome scopes can be passed through Singly to a service via the `scope`
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Singly
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -4,6 +4,7 @@ module OmniAuth
4
4
  module Strategies
5
5
  class Singly < OmniAuth::Strategies::OAuth2
6
6
  PASSTHROUGHS = %w[
7
+ access_token
7
8
  account
8
9
  scope
9
10
  service
@@ -13,7 +14,7 @@ module OmniAuth
13
14
 
14
15
  option :client_options, {
15
16
  :site => "https://api.singly.com",
16
- :authorize_url => "https://api.singly.com/oauth/authorize",
17
+ :authorize_url => "https://api.singly.com/oauth/authenticate",
17
18
  :token_url => "https://api.singly.com/oauth/access_token"
18
19
  }
19
20
 
@@ -13,7 +13,7 @@ describe OmniAuth::Strategies::Singly do
13
13
 
14
14
  it "uses the correct authorize_url" do
15
15
  subject.options.client_options.authorize_url.
16
- should == "https://api.singly.com/oauth/authorize"
16
+ should == "https://api.singly.com/oauth/authenticate"
17
17
  end
18
18
 
19
19
  it "uses the correct token_url" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-singly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
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-09-28 00:00:00.000000000 Z
12
+ date: 2012-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth