firebase_admin_auth 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/firebase_admin_auth/client.rb +18 -3
- data/lib/firebase_admin_auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e89cbd445ce865a3da94d4d59fa321f16c64580d259e91036f5ecd5f1e7ecb8c
|
4
|
+
data.tar.gz: cd27ad0aefd48e43970eabf04cc007fbf7161425a907a3352a2cd3bde87f6cfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b223175f628acbf1b1aa0109713d8438c1ad0fd71e17c4bb39d98882c8a538c5e787e0d93add1a0efc2764bbae1524be2d52284112ee6668ad388206671519f
|
7
|
+
data.tar.gz: 3e2a3fdd74c1778f6b2bb7cedfba9783bf32b18f73118ab041da78f1ddecf9c12c09533c749d82a0826cfbb8c3eb31a0750b91845bbbb62e9d0c042c219e713f
|
@@ -2,7 +2,8 @@ require 'google/apis/identitytoolkit_v3'
|
|
2
2
|
|
3
3
|
module FirebaseAdminAuth
|
4
4
|
class Client
|
5
|
-
SCOPE = 'https://www.googleapis.com/auth/identitytoolkit'
|
5
|
+
SCOPE = 'https://www.googleapis.com/auth/identitytoolkit'.freeze
|
6
|
+
MAX_TIMES = 3.freeze
|
6
7
|
|
7
8
|
def initialize(service_account_json_key)
|
8
9
|
@service = Google::Apis::IdentitytoolkitV3::IdentityToolkitService.new
|
@@ -19,8 +20,22 @@ module FirebaseAdminAuth
|
|
19
20
|
email_verified: true
|
20
21
|
)
|
21
22
|
|
22
|
-
|
23
|
-
|
23
|
+
attempt_times = 0
|
24
|
+
begin
|
25
|
+
attempt_times += 1
|
26
|
+
@result = @service.signup_new_user(request_signup)
|
27
|
+
rescue => e
|
28
|
+
if attempt_times <= MAX_TIMES
|
29
|
+
retry
|
30
|
+
else
|
31
|
+
puts e
|
32
|
+
raise
|
33
|
+
end
|
34
|
+
ensure
|
35
|
+
puts 'finish'
|
36
|
+
end
|
37
|
+
|
38
|
+
@result.local_id
|
24
39
|
end
|
25
40
|
end
|
26
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firebase_admin_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TaneiKanta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: this is used firebase console automatic
|
14
14
|
email:
|