stytch 3.6.0 → 3.9.0

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: 4b0df049845701e13ae486eaf2031c118115588171ff8e486c7c5a7e0c6adc58
4
- data.tar.gz: 7532843bccf0d29542b3a2358969085fc8faf9800010770b8d288d624713a0bf
3
+ metadata.gz: 93e1f89bed0f2c91f7caac140e7dc10b154d116eda9a0b89078f48336da15fcb
4
+ data.tar.gz: 736f9a25fd2e902024fab4ff5ce01eb21b26f8562d02236f6fc3f16bf37c63c0
5
5
  SHA512:
6
- metadata.gz: 0777de15b4986e805daf9640e178b479e28f5954d133dc2ed11e8c21c1ab192d3eb7917bde055dc7a23836ba112f8d446f4877c7fdbb6af711ae17f974352cda
7
- data.tar.gz: d2ae3531f577256dceecd0d7e1326f65ceda2176bc27cb301409d6bf2a87cb5a5d9740ced383d7fafe83ba9673299db714e36d745e82e859e4badb48b2b4d324
6
+ metadata.gz: 345ddac68abf1011f6cca16fa1115b3b45bfe9067b6b66883bc3fb57aad5f374c9174333473cefaab5314175fe42aa2cf840d89cc6112c4ba95513b79cc7db50
7
+ data.tar.gz: 437f1988244668c730bef3106ebca258c6b4ed846ebceef93d186a38bc0ea97e39dff6d6dd129790935a6b170c9580aff7c9736c7f0e1aaf42c344d8e5e8d900
@@ -71,8 +71,8 @@ module Stytch
71
71
  email:,
72
72
  hash:,
73
73
  hash_type:,
74
- prepend_salt: nil,
75
- append_salt: nil
74
+ md_5_config: {},
75
+ argon_2_config: {}
76
76
  )
77
77
  request = {
78
78
  email: email,
@@ -80,8 +80,8 @@ module Stytch
80
80
  hash_type: hash_type
81
81
  }
82
82
 
83
- request[:prepend_salt] = prepend_salt unless prepend_salt.nil?
84
- request[:append_salt] = append_salt unless append_salt.nil?
83
+ request[:md_5_config] = md_5_config unless md_5_config != {}
84
+ request[:argon_2_config] = argon_2_config unless argon_2_config != {}
85
85
 
86
86
  post_request("#{PATH}/migrate", request)
87
87
  end
@@ -99,7 +99,6 @@ module Stytch
99
99
  email:,
100
100
  login_redirect_url: nil,
101
101
  reset_password_redirect_url: nil,
102
- login_expiration_minutes: nil,
103
102
  reset_password_expiration_minutes: nil,
104
103
  attributes: {},
105
104
  code_challenge: nil
@@ -110,7 +109,6 @@ module Stytch
110
109
 
111
110
  request[:login_redirect_url] = login_redirect_url unless login_redirect_url.nil?
112
111
  request[:reset_password_redirect_url] = reset_password_redirect_url unless reset_password_redirect_url.nil?
113
- request[:login_expiration_minutes] = login_expiration_minutes unless login_expiration_minutes.nil?
114
112
  unless reset_password_expiration_minutes.nil?
115
113
  request[:reset_password_expiration_minutes] =
116
114
  reset_password_expiration_minutes
@@ -15,8 +15,17 @@ module Stytch
15
15
  def initialize(connection, project_id)
16
16
  @connection = connection
17
17
  @project_id = project_id
18
- @jwks_loader = ->(options) do
19
- options[:invalidate] ? jwks(project_id: @project_id) : {}
18
+ @cache_last_update = 0
19
+ @jwks_loader = lambda do |options|
20
+ @cached_keys = nil if options[:invalidate] && @cache_last_update < Time.now.to_i - 300
21
+ @cached_keys ||= begin
22
+ @cache_last_update = Time.now.to_i
23
+ keys = []
24
+ jwks(project_id: @project_id)['keys'].each do |r|
25
+ keys << r
26
+ end
27
+ { keys: keys }
28
+ end
20
29
  end
21
30
  end
22
31
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '3.6.0'
4
+ VERSION = '3.9.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stytch
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-11 00:00:00.000000000 Z
11
+ date: 2022-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday