omniauth-intercom 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9cc4b63168458f6eb45062bf901864f5aa0f0533
4
- data.tar.gz: 48bc1674a2e5a98ce8da36533e94d351701fe6cd
3
+ metadata.gz: 97bae77e1098c2669636368894d52bb545610761
4
+ data.tar.gz: 87741d51fabef74e89b80362b4a3cbfe4a9ff8ad
5
5
  SHA512:
6
- metadata.gz: 3edec553183d3b700385dfe784df7a137e65b51d28c71df4c30bb1abab861fd4ba4f2181f0447f1936aa83adee0a6389e266723a065e754f2560f96d38e22012
7
- data.tar.gz: b0dcbec48603ea1e0b41423378793e5e6b7a79e0982cfec76d4f64b9494af0b4164aceaa60fd1b033ce9dceea02729801f99572f402dce1fec03d79b75a49bad
6
+ metadata.gz: 06e3fbd1079833a91b8dccdca26b0e5bbf8fc478cdcd6e2cd1cf8b13e1ac10f1ea4155c231b7a86f5a6826243210d887b0390ca57314890d50cb08f997539256
7
+ data.tar.gz: 0968d46f6eb254509ede3620b31314aecee046fcd55f0ed7078c50d9f645b2797e3d6c4e56d8a91ce2ad989102a44885c0c8201dc27c1417f77bb701cbd2e811
data/CHANGELOG.md CHANGED
@@ -40,4 +40,9 @@ Features:
40
40
  ## 0.1.6 (2017-01-20)
41
41
 
42
42
  Features:
43
- - add custom user agent
43
+ - add custom user agent
44
+
45
+ ## 0.1.7 (2017-02-27)
46
+
47
+ Features:
48
+ - add verify email config
data/README.md CHANGED
@@ -9,7 +9,7 @@ Supports the OAuth 2.0 server-side and client-side flows. Read the [Intercom OAu
9
9
  Add to your `Gemfile`:
10
10
 
11
11
  ```ruby
12
- gem 'omniauth-intercom', '~> 0.1.6'
12
+ gem 'omniauth-intercom', '~> 0.1.7'
13
13
  ```
14
14
 
15
15
  Then `bundle install`.
@@ -31,6 +31,15 @@ You can start the authentication process directly with the signup page by access
31
31
  **Important** You need the `read_single_admin` permissions to use this middleware.
32
32
  **Important** Your `redirect_url` should be `/auth/intercom/callback`
33
33
 
34
+ By default Intercom strategy rejects users with unverified email addresses. `info` and `raw_info` in `request.env['omniauth.auth']` will not be populated in that case.
35
+ To disable this check add `verify_email: false` to your config:
36
+
37
+ ```ruby
38
+ Rails.application.config.middleware.use OmniAuth::Builder do
39
+ provider :intercom, ENV['INTERCOM_KEY'], ENV['INTERCOM_SECRET'], verify_email: false
40
+ end
41
+ ```
42
+
34
43
  ## Auth Hash
35
44
 
36
45
  Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Intercom
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
@@ -12,6 +12,8 @@ module OmniAuth
12
12
  :token_url => 'https://api.intercom.io/auth/eagle/token'
13
13
  }
14
14
 
15
+ option :verify_email, true
16
+
15
17
  uid { raw_info['id'] }
16
18
 
17
19
  info do
@@ -36,7 +38,7 @@ module OmniAuth
36
38
  access_token.options[:mode] = :body
37
39
  @raw_info ||= begin
38
40
  parsed = access_token.get('/me').parsed
39
- if parsed['email_verified'] != true
41
+ if options.verify_email && parsed['email_verified'] != true
40
42
  return {}
41
43
  end
42
44
  parsed
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-intercom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Antoine
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-23 00:00:00.000000000 Z
11
+ date: 2017-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.12'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rack
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.6'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.6'
83
83
  description:
@@ -87,9 +87,9 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - .gitignore
91
- - .rspec
92
- - .travis.yml
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".travis.yml"
93
93
  - CHANGELOG.md
94
94
  - Gemfile
95
95
  - LICENSE.txt
@@ -113,17 +113,17 @@ require_paths:
113
113
  - lib
114
114
  required_ruby_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - '>='
121
+ - - ">="
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.0.14.1
126
+ rubygems_version: 2.5.1
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Intercom OAuth2 Strategy for OmniAuth