api_user_auth 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
  SHA256:
3
- metadata.gz: '08a8446fa629d3cf053166db6523f93427d6350cc7960e4ff2a221ad506bc32d'
4
- data.tar.gz: 37796f8159c065853f3831049c557734a4385d519140f5e980af43c191c223ec
3
+ metadata.gz: 2d5967bcf7944e5b46316930ae42cb248ae17d02d9404e19365548c78ad18a08
4
+ data.tar.gz: e55c4097fe0c3f361ff5f7c64c42cc3eace47d2da619f28670562f5f91358699
5
5
  SHA512:
6
- metadata.gz: 14768fbaf67800d2d91cd4e69b9311ebe9ec8e8624ad25501ed4291afe0b6d08c77e226a8fbd570c5c221902e6e5a2a4250669b19a5ddcc80ff623c5337cf6ec
7
- data.tar.gz: 33ff1d1acf65b990e729813650a594c6c1ad02698b5ae16e641ab8a140cf166cfda7e73885fa0ae5bb5d3b5de66aecd1e183506428fab37a10e0a882d48471d8
6
+ metadata.gz: bebea8b44dbb73d668d48e4e2358626fa8ca12661acaad36bdfb3aacc91de50240eedd213168d10e3dc9f276254ea6dd076150bb215246a370ccdd48d94bc7cb
7
+ data.tar.gz: d683b815c74cb6fc23e3c930f4db5459df2011b2eb2e1e63669fef4835c1d44593d18fe64fae1d23036cbe99c9a792d607d4d4d912a107ccbca0ee13f6a9237d
@@ -14,9 +14,13 @@ module ApiUserAuth
14
14
  end
15
15
 
16
16
  def self.create_by_data(data, auth_user)
17
- auth_user ||= create_auth_user(data)
18
17
  if find_by_data(data).blank?
19
- auth_user.provider_tokens.create(
18
+ a_user = if auth_user.blank?
19
+ create_auth_user(data)
20
+ else
21
+ auth_user
22
+ end
23
+ a_user.provider_tokens.create(
20
24
  provider: data[:provider],
21
25
  user_id: data[:id],
22
26
  user_data: data
@@ -1,3 +1,3 @@
1
1
  module ApiUserAuth
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_user_auth
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
  - Alex M