sync_attr_with_auth0 0.0.23 → 0.0.24
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.
- checksums.yaml +4 -4
- data/lib/sync_attr_with_auth0/model.rb +13 -0
- 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: a7e91115c9447ecd2b8c612d2148904259669f0a
|
4
|
+
data.tar.gz: fb061ecdefe8d8abffe3a05bdbcc8eb21c355ace
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e347c8c400a52ed35192e00452f808ffdc86c5efdd4894eafba59a9f135cc4b56fc7d2fdd1b03bdfc2faaf26f1f60ae05bf2e92978294516d9ec855970ab026
|
7
|
+
data.tar.gz: 0b0b318a9e8abd32793cc6c6eec261427e5f04abf2a812e73fac837498da67a300493be6c5c1b403aa284b85e15b9a9fc9cf8cb236bd1423771b0d59876e670f
|
@@ -171,6 +171,15 @@ module SyncAttrWithAuth0
|
|
171
171
|
args['verify_password'] = auth0_verify_password?
|
172
172
|
end
|
173
173
|
|
174
|
+
if (
|
175
|
+
auth0_sync_options[:sync_atts].index(auth0_sync_options[:email_att]) and
|
176
|
+
auth0_email_changed?
|
177
|
+
)
|
178
|
+
# The email should be sync'd and was changed
|
179
|
+
args['email'] = self.send(auth0_sync_options[:email_att])
|
180
|
+
args['verify_email'] = auth0_email_verified?
|
181
|
+
end
|
182
|
+
|
174
183
|
args['user_metadata'] = user_metadata
|
175
184
|
|
176
185
|
begin
|
@@ -230,6 +239,10 @@ module SyncAttrWithAuth0
|
|
230
239
|
!!(self.respond_to?(auth0_sync_options[:email_verified_att]) ? self.send(auth0_sync_options[:email_verified_att]) : false)
|
231
240
|
end
|
232
241
|
|
242
|
+
def auth0_email_changed?
|
243
|
+
!!(self.respond_to?(auth0_sync_options[:email_att]) ? self.send("#{auth0_sync_options[:email_att]}_changed?") : false)
|
244
|
+
end
|
245
|
+
|
233
246
|
def auth0_verify_password?
|
234
247
|
!!(self.respond_to?(auth0_sync_options[:verify_password_att]) ? self.send(auth0_sync_options[:verify_password_att]) : true)
|
235
248
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sync_attr_with_auth0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick McGraw
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: '0'
|
168
168
|
requirements: []
|
169
169
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.4.
|
170
|
+
rubygems_version: 2.4.5
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: Synchronize attributes on a local ActiveRecord user model with the user metadata
|