Skip to content

Commit 8c5e75d

Browse files
feat: Expire stuck IN_PROGRESS managed auth sessions via background worker
1 parent e36b009 commit 8c5e75d

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 112
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-e14974fd90680e5745b35d8718a1ccce2181f6d17a6e0a1fd35fc5bca88795ae.yml
3-
openapi_spec_hash: 1b3aa75f0ab48b122d514047f9c82873
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-a674e3c4c0063942621d1b4e7f67b72f7e240c12dd88564fe16627618ba33dd6.yml
3+
openapi_spec_hash: 8b97c87f0dafe5fc5e5a7365f3687755
44
config_hash: 08d55086449943a8fec212b870061a3f

src/resources/auth/connections.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ export interface ManagedAuth {
293293
external_action_message?: string | null;
294294

295295
/**
296-
* When the current flow expires (null when no flow in progress)
296+
* When the current flow expires (null when no flow in progress). A flow past this
297+
* timestamp is no longer valid and its `flow_status` will be `EXPIRED`. Clients
298+
* may start a new login to supersede a stale `IN_PROGRESS` flow past this
299+
* timestamp.
297300
*/
298301
flow_expires_at?: string | null;
299302

@@ -333,10 +336,21 @@ export interface ManagedAuth {
333336
hosted_url?: string | null;
334337

335338
/**
336-
* When the profile was last successfully authenticated
339+
* @deprecated Deprecated alias for `last_auth_check_at`. Despite the name, this is
340+
* the last health-check timestamp, not the last successful authentication. Use
341+
* `last_auth_check_at` instead.
337342
*/
338343
last_auth_at?: string;
339344

345+
/**
346+
* When the most recent auth health check ran for this connection, regardless of
347+
* outcome. Updated on every health check and does not by itself indicate that the
348+
* profile is currently authenticated - use `status` for that. May be newer than
349+
* `flow_expires_at` when a flow is still in progress because health checks
350+
* continue to run in parallel.
351+
*/
352+
last_auth_check_at?: string;
353+
340354
/**
341355
* Browser live view URL for debugging (present when flow in progress)
342356
*/

0 commit comments

Comments
 (0)