firebase_admin_auth 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ca82d5cc84a57a67ecffcdc9173d7c96c338d8b268e0ecd071dd4f85041cd79
4
- data.tar.gz: 6c358bbbda4f5ba2cc3140a8ec5f8688432ab278f3ab9007ad13f24e7de44683
3
+ metadata.gz: e89cbd445ce865a3da94d4d59fa321f16c64580d259e91036f5ecd5f1e7ecb8c
4
+ data.tar.gz: cd27ad0aefd48e43970eabf04cc007fbf7161425a907a3352a2cd3bde87f6cfa
5
5
  SHA512:
6
- metadata.gz: ac80d51f543187333417753d9fa7055743ab8cee6674e9528e197a32191b7e2f587e1b4d8c4aa3581f56ec5084e201de17ac31c25cf17d5fee8e245c5776ff95
7
- data.tar.gz: 6479c0629b7a4291c316e028e7ce32723c14a90f0c719511a58772023905a8ee8d4a65d95a2ced64f9f81b6f280b04643dd62d77906410ecde593cc74a28396a
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
- result = @service.signup_new_user(request_signup)
23
- result.local_id
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FirebaseAdminAuth
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  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.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-25 00:00:00.000000000 Z
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: