firebase_token_auth 1.2.1 → 1.2.2

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: b80452c76a12e4f2cb4728f5b681073dfb6efe70ff15664c572b21e414e1f08e
4
- data.tar.gz: 962a2a3c6e80569c3191b4366a0c1d55b42e6197fc3b967a1ab3446fca3bcdb9
3
+ metadata.gz: 70ba9577033bd9cea4a260988ef4f59d12bf8740316e1ac0f063d9b3b4c96814
4
+ data.tar.gz: 15f4220908cf05164357bc438494a92b8730ebcb5ec6689a367b7dfcbdb638ef
5
5
  SHA512:
6
- metadata.gz: daa8b971bd3390f5a9a239064b318b47f50ecb84afbd87bb21bca65725fcabc5f79046407e1a60e23be78e0352780657c4d7d2ec993a6edb7b4b89344879054d
7
- data.tar.gz: 961d9740f5b618d7bd73be5e578a3d14e576914510479c7328f57db1652c46b642d63430dbe460d666b040c81fd1c0671ff7633acfb354b01ee19c474eaa6f70
6
+ metadata.gz: f6e52a8dd7b81c06d140b9a7e8d350879e74fc21c6c261267a247ce4f80d233dd2b3ebbea4945d9bd1f0d5450a6ae2ce819dc4a1d325c976290c48f8d38ec4e5
7
+ data.tar.gz: 6812e67073338a0a5af317b83255a64916023054ce1e9638dd0ade1dd997353df4b2b3aba51ea19e6367e9b428c5d94ffb953384359ed01e8de93cac567670f3
data/README.md CHANGED
@@ -54,7 +54,7 @@ FirebaseTokenAuth.configure do |config|
54
54
  config.project_id = 'your_project_id'
55
55
  end
56
56
 
57
- client = Firebase.build
57
+ client = FirebaseTokenAuth.build
58
58
  result = client.verify_id_token(id_token)
59
59
 
60
60
  puts result.uid
@@ -32,6 +32,7 @@ module FirebaseTokenAuth
32
32
  public_key_manager.refresh_publickeys!
33
33
  validator.validate(configuration.project_id, decoded_jwt)
34
34
  default_options = { algorithm: ALGORITHM, verify_iat: true, verify_expiration: true, exp_leeway: configuration.exp_leeway }
35
+ raise ValidationError, 'Public key may have expired.' unless public_key_manager.public_keys.include?(public_key_id)
35
36
  jwt = JWT.decode(id_token, public_key_manager.public_keys[public_key_id].public_key, true, default_options.merge!(options))
36
37
  IdTokenResult.new(jwt[0]['sub'], IdToken.new(jwt[0], jwt[1]))
37
38
  end
@@ -1,3 +1,3 @@
1
1
  module FirebaseTokenAuth
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = '1.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firebase_token_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - miyataka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-12 00:00:00.000000000 Z
11
+ date: 2021-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-identitytoolkit_v3
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.0.3
90
+ rubygems_version: 3.1.4
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Firebase Authentication API wrapper for serverside. It support custom token