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 +4 -4
- data/app/models/api_user_auth/provider_token.rb +6 -2
- data/lib/api_user_auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d5967bcf7944e5b46316930ae42cb248ae17d02d9404e19365548c78ad18a08
|
4
|
+
data.tar.gz: e55c4097fe0c3f361ff5f7c64c42cc3eace47d2da619f28670562f5f91358699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|