stytch 10.35.0 → 10.36.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: a21c7819e335e5e1512dd207196f170a535f83abb0cfd2075d1e74c031016e62
4
- data.tar.gz: 7241e6caccaaf5a7380b3dd6acca90fd619d5df457a8c368d1c0d8ef667bce8a
3
+ metadata.gz: b5375f5cc73fc55e5a1ce59245ccc603c0a1016bd0b66a1345f66ed2cf1932e8
4
+ data.tar.gz: a0dc5c704106760e2933e5ecef5318f089cb6512833830a1d44daf386857c886
5
5
  SHA512:
6
- metadata.gz: e0b5df47cb45208d49f4cb9558066e698438905eec30b11febc43b55623b5a81afe90112d4110dcc385ec483ab6a9335b3bf5e43a04e85ea912ffc64babe5048
7
- data.tar.gz: 7c513da2af700131f700ba74e2319043e677a2ad295bfe93a0cb22ca5b73ff49060781cccff7e9f86783796975bc0dc65f9bed497ee6f45cccce06a74264292d
6
+ metadata.gz: d2e8fce4daaeb98021b3acbaa8fb934453c6a90659f25c1ab81568647b8363c1f1af0bfc22cbf6b787f03017094309ffa77d0d7596a7ed5d78ae419abd58a244
7
+ data.tar.gz: 3463bf3f5bde80a5bccbeffc482af33ed86f9beca239f9e8fe4b038a5380b6e5952e20ffb05316aca7fbc4fb84e602803f5a8559db9e10482385edad570eacff
@@ -33,11 +33,12 @@ module StytchB2B
33
33
 
34
34
  attr_reader :connected_app, :debug, :discovery, :fraud, :idp, :impersonation, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :project, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
35
35
 
36
- def initialize(project_id:, secret:, env: nil, fraud_env: nil, &block)
36
+ def initialize(project_id:, secret:, env: nil, fraud_env: nil, timeout: nil, &block)
37
37
  @api_host = api_host(env, project_id)
38
38
  @fraud_api_host = fraud_api_host(fraud_env)
39
39
  @project_id = project_id
40
40
  @secret = secret
41
+ @timeout = timeout
41
42
  @is_b2b_client = true
42
43
 
43
44
  create_connection(&block)
@@ -108,7 +109,7 @@ module StytchB2B
108
109
  end
109
110
 
110
111
  def build_default_connection(builder)
111
- builder.options[:timeout] = Stytch::Middleware::NETWORK_TIMEOUT
112
+ builder.options[:timeout] = Stytch::Middleware.timeout(@timeout)
112
113
  builder.headers = Stytch::Middleware::NETWORK_HEADERS
113
114
  builder.request :json
114
115
  builder.use Stytch::Middleware
data/lib/stytch/client.rb CHANGED
@@ -31,11 +31,12 @@ module Stytch
31
31
 
32
32
  attr_reader :connected_app, :crypto_wallets, :debug, :fraud, :idp, :impersonation, :m2m, :magic_links, :oauth, :otps, :passwords, :project, :rbac, :sessions, :totps, :users, :webauthn
33
33
 
34
- def initialize(project_id:, secret:, env: nil, fraud_env: nil, &block)
34
+ def initialize(project_id:, secret:, env: nil, fraud_env: nil, timeout: nil, &block)
35
35
  @api_host = api_host(env, project_id)
36
36
  @fraud_api_host = fraud_api_host(fraud_env)
37
37
  @project_id = project_id
38
38
  @secret = secret
39
+ @timeout = timeout
39
40
  @is_b2b_client = false
40
41
 
41
42
  create_connection(&block)
@@ -104,7 +105,7 @@ module Stytch
104
105
  end
105
106
 
106
107
  def build_default_connection(builder)
107
- builder.options[:timeout] = Stytch::Middleware::NETWORK_TIMEOUT
108
+ builder.options[:timeout] = Stytch::Middleware.timeout(@timeout)
108
109
  builder.headers = Stytch::Middleware::NETWORK_HEADERS
109
110
  builder.request :json
110
111
  builder.use Stytch::Middleware
@@ -13,6 +13,10 @@ module Stytch
13
13
  'Content-Type' => 'application/json'
14
14
  }.freeze
15
15
 
16
- NETWORK_TIMEOUT = 300
16
+ NETWORK_TIMEOUT = 31
17
+
18
+ def self.timeout(custom_timeout = nil)
19
+ custom_timeout || NETWORK_TIMEOUT
20
+ end
17
21
  end
18
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '10.35.0'
4
+ VERSION = '10.36.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: 10.35.0
4
+ version: 10.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-09-26 00:00:00.000000000 Z
11
+ date: 2025-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday