mongodb 5.1.0 → 5.3.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.
Files changed (144) hide show
  1. package/README.md +25 -22
  2. package/lib/admin.js +2 -0
  3. package/lib/admin.js.map +1 -1
  4. package/lib/bulk/common.js +28 -7
  5. package/lib/bulk/common.js.map +1 -1
  6. package/lib/change_stream.js +1 -1
  7. package/lib/cmap/auth/auth_provider.js +21 -10
  8. package/lib/cmap/auth/auth_provider.js.map +1 -1
  9. package/lib/cmap/auth/gssapi.js +71 -116
  10. package/lib/cmap/auth/gssapi.js.map +1 -1
  11. package/lib/cmap/auth/mongo_credentials.js +7 -9
  12. package/lib/cmap/auth/mongo_credentials.js.map +1 -1
  13. package/lib/cmap/auth/mongocr.js +20 -29
  14. package/lib/cmap/auth/mongocr.js.map +1 -1
  15. package/lib/cmap/auth/mongodb_aws.js +125 -140
  16. package/lib/cmap/auth/mongodb_aws.js.map +1 -1
  17. package/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js +28 -0
  18. package/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js.map +1 -0
  19. package/lib/cmap/auth/mongodb_oidc/callback_workflow.js +178 -0
  20. package/lib/cmap/auth/mongodb_oidc/callback_workflow.js.map +1 -0
  21. package/lib/cmap/auth/mongodb_oidc/service_workflow.js +41 -0
  22. package/lib/cmap/auth/mongodb_oidc/service_workflow.js.map +1 -0
  23. package/lib/cmap/auth/mongodb_oidc/token_entry_cache.js +115 -0
  24. package/lib/cmap/auth/mongodb_oidc/token_entry_cache.js.map +1 -0
  25. package/lib/cmap/auth/mongodb_oidc/workflow.js +3 -0
  26. package/lib/cmap/auth/mongodb_oidc/workflow.js.map +1 -0
  27. package/lib/cmap/auth/mongodb_oidc.js +59 -0
  28. package/lib/cmap/auth/mongodb_oidc.js.map +1 -1
  29. package/lib/cmap/auth/plain.js +4 -5
  30. package/lib/cmap/auth/plain.js.map +1 -1
  31. package/lib/cmap/auth/providers.js +1 -1
  32. package/lib/cmap/auth/providers.js.map +1 -1
  33. package/lib/cmap/auth/scram.js +45 -73
  34. package/lib/cmap/auth/scram.js.map +1 -1
  35. package/lib/cmap/auth/x509.js +8 -11
  36. package/lib/cmap/auth/x509.js.map +1 -1
  37. package/lib/cmap/command_monitoring_events.js +14 -5
  38. package/lib/cmap/command_monitoring_events.js.map +1 -1
  39. package/lib/cmap/commands.js +1 -1
  40. package/lib/cmap/commands.js.map +1 -1
  41. package/lib/cmap/connect.js +73 -86
  42. package/lib/cmap/connect.js.map +1 -1
  43. package/lib/cmap/connection.js +19 -23
  44. package/lib/cmap/connection.js.map +1 -1
  45. package/lib/cmap/connection_pool.js +56 -14
  46. package/lib/cmap/connection_pool.js.map +1 -1
  47. package/lib/cmap/connection_pool_events.js +28 -3
  48. package/lib/cmap/connection_pool_events.js.map +1 -1
  49. package/lib/cmap/handshake/client_metadata.js +173 -0
  50. package/lib/cmap/handshake/client_metadata.js.map +1 -0
  51. package/lib/cmap/message_stream.js.map +1 -1
  52. package/lib/cmap/wire_protocol/shared.js +1 -16
  53. package/lib/cmap/wire_protocol/shared.js.map +1 -1
  54. package/lib/collection.js +10 -10
  55. package/lib/connection_string.js +50 -69
  56. package/lib/connection_string.js.map +1 -1
  57. package/lib/constants.js +11 -0
  58. package/lib/constants.js.map +1 -1
  59. package/lib/cursor/abstract_cursor.js +2 -1
  60. package/lib/cursor/abstract_cursor.js.map +1 -1
  61. package/lib/cursor/find_cursor.js +1 -1
  62. package/lib/db.js +4 -2
  63. package/lib/db.js.map +1 -1
  64. package/lib/error.js +2 -1
  65. package/lib/error.js.map +1 -1
  66. package/lib/mongo_client.js +23 -2
  67. package/lib/mongo_client.js.map +1 -1
  68. package/lib/mongo_logger.js +236 -23
  69. package/lib/mongo_logger.js.map +1 -1
  70. package/lib/operations/add_user.js.map +1 -1
  71. package/lib/operations/execute_operation.js +8 -27
  72. package/lib/operations/execute_operation.js.map +1 -1
  73. package/lib/operations/find.js +1 -8
  74. package/lib/operations/find.js.map +1 -1
  75. package/lib/operations/update.js.map +1 -1
  76. package/lib/read_concern.js +1 -1
  77. package/lib/read_preference.js +2 -2
  78. package/lib/sdam/srv_polling.js +1 -15
  79. package/lib/sdam/srv_polling.js.map +1 -1
  80. package/lib/sdam/topology.js +0 -16
  81. package/lib/sdam/topology.js.map +1 -1
  82. package/lib/utils.js +33 -90
  83. package/lib/utils.js.map +1 -1
  84. package/lib/write_concern.js +1 -1
  85. package/mongodb.d.ts +242 -93
  86. package/package.json +30 -31
  87. package/src/admin.ts +2 -0
  88. package/src/bulk/common.ts +29 -8
  89. package/src/change_stream.ts +5 -5
  90. package/src/cmap/auth/auth_provider.ts +29 -16
  91. package/src/cmap/auth/gssapi.ts +102 -149
  92. package/src/cmap/auth/mongo_credentials.ts +14 -23
  93. package/src/cmap/auth/mongocr.ts +31 -36
  94. package/src/cmap/auth/mongodb_aws.ts +166 -189
  95. package/src/cmap/auth/mongodb_oidc/aws_service_workflow.ts +26 -0
  96. package/src/cmap/auth/mongodb_oidc/callback_workflow.ts +259 -0
  97. package/src/cmap/auth/mongodb_oidc/service_workflow.ts +47 -0
  98. package/src/cmap/auth/mongodb_oidc/token_entry_cache.ts +166 -0
  99. package/src/cmap/auth/mongodb_oidc/workflow.ts +21 -0
  100. package/src/cmap/auth/mongodb_oidc.ts +101 -17
  101. package/src/cmap/auth/plain.ts +6 -6
  102. package/src/cmap/auth/providers.ts +2 -2
  103. package/src/cmap/auth/scram.ts +56 -90
  104. package/src/cmap/auth/x509.ts +12 -18
  105. package/src/cmap/command_monitoring_events.ts +18 -3
  106. package/src/cmap/commands.ts +1 -1
  107. package/src/cmap/connect.ts +92 -114
  108. package/src/cmap/connection.ts +39 -25
  109. package/src/cmap/connection_pool.ts +89 -18
  110. package/src/cmap/connection_pool_events.ts +68 -6
  111. package/src/cmap/handshake/client_metadata.ts +272 -0
  112. package/src/cmap/message_stream.ts +0 -2
  113. package/src/cmap/wire_protocol/compression.ts +1 -1
  114. package/src/cmap/wire_protocol/shared.ts +1 -23
  115. package/src/collection.ts +13 -13
  116. package/src/connection_string.ts +56 -72
  117. package/src/constants.ts +11 -0
  118. package/src/cursor/abstract_cursor.ts +3 -2
  119. package/src/cursor/change_stream_cursor.ts +5 -5
  120. package/src/cursor/find_cursor.ts +1 -1
  121. package/src/db.ts +4 -2
  122. package/src/deps.ts +3 -2
  123. package/src/error.ts +3 -2
  124. package/src/index.ts +21 -3
  125. package/src/mongo_client.ts +60 -14
  126. package/src/mongo_logger.ts +341 -40
  127. package/src/mongo_types.ts +2 -2
  128. package/src/operations/add_user.ts +8 -2
  129. package/src/operations/aggregate.ts +1 -1
  130. package/src/operations/create_collection.ts +1 -1
  131. package/src/operations/execute_operation.ts +8 -25
  132. package/src/operations/find.ts +1 -11
  133. package/src/operations/find_and_modify.ts +4 -4
  134. package/src/operations/set_profiling_level.ts +1 -1
  135. package/src/operations/stats.ts +1 -1
  136. package/src/operations/update.ts +8 -4
  137. package/src/read_concern.ts +2 -2
  138. package/src/read_preference.ts +3 -3
  139. package/src/sdam/common.ts +2 -2
  140. package/src/sdam/srv_polling.ts +1 -16
  141. package/src/sdam/topology.ts +1 -23
  142. package/src/transactions.ts +1 -1
  143. package/src/utils.ts +37 -147
  144. package/src/write_concern.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongodb",
3
- "version": "5.1.0",
3
+ "version": "5.3.0",
4
4
  "description": "The official MongoDB driver for Node.js",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  "email": "dbx-node@mongodb.com"
26
26
  },
27
27
  "dependencies": {
28
- "bson": "^5.0.1",
28
+ "bson": "^5.2.0",
29
29
  "mongodb-connection-string-url": "^2.6.0",
30
30
  "socks": "^2.7.1"
31
31
  },
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@aws-sdk/credential-providers": "^3.201.0",
37
- "mongodb-client-encryption": "^2.3.0",
37
+ "mongodb-client-encryption": ">=2.3.0 <3",
38
38
  "snappy": "^7.2.2"
39
39
  },
40
40
  "peerDependenciesMeta": {
@@ -51,52 +51,51 @@
51
51
  "devDependencies": {
52
52
  "@iarna/toml": "^2.2.5",
53
53
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
54
- "@microsoft/api-extractor": "^7.33.7",
54
+ "@microsoft/api-extractor": "^7.34.4",
55
55
  "@microsoft/tsdoc-config": "^0.16.2",
56
- "@mongodb-js/zstd": "^1.0.0",
57
- "@types/chai": "^4.3.3",
56
+ "@mongodb-js/zstd": "^1.1.0",
57
+ "@types/chai": "^4.3.4",
58
58
  "@types/chai-subset": "^1.3.3",
59
- "@types/express": "^4.17.14",
59
+ "@types/express": "^4.17.17",
60
60
  "@types/kerberos": "^1.1.1",
61
- "@types/mocha": "^10.0.0",
62
- "@types/node": "^18.11.0",
61
+ "@types/mocha": "^10.0.1",
62
+ "@types/node": "^18.11.19",
63
63
  "@types/saslprep": "^1.0.1",
64
- "@types/semver": "^7.3.12",
64
+ "@types/semver": "^7.3.13",
65
65
  "@types/sinon": "^10.0.13",
66
- "@types/sinon-chai": "^3.2.8",
66
+ "@types/sinon-chai": "^3.2.9",
67
67
  "@types/whatwg-url": "^11.0.0",
68
- "@typescript-eslint/eslint-plugin": "^5.48.0",
69
- "@typescript-eslint/parser": "^5.48.0",
70
- "chai": "^4.3.6",
68
+ "@typescript-eslint/eslint-plugin": "^5.55.0",
69
+ "@typescript-eslint/parser": "^5.55.0",
70
+ "chai": "^4.3.7",
71
71
  "chai-subset": "^1.6.0",
72
72
  "chalk": "^4.1.2",
73
- "eslint": "^8.31.0",
74
- "eslint-config-prettier": "^8.5.0",
75
- "eslint-plugin-import": "^2.26.0",
73
+ "eslint": "^8.36.0",
74
+ "eslint-config-prettier": "^8.7.0",
75
+ "eslint-plugin-import": "^2.27.5",
76
76
  "eslint-plugin-prettier": "^4.2.1",
77
- "eslint-plugin-simple-import-sort": "^8.0.0",
77
+ "eslint-plugin-simple-import-sort": "^10.0.0",
78
78
  "eslint-plugin-tsdoc": "^0.2.17",
79
79
  "express": "^4.18.2",
80
80
  "js-yaml": "^4.1.0",
81
- "mocha": "^9.2.2",
81
+ "mocha": "^10.2.0",
82
82
  "mocha-sinon": "^2.1.2",
83
- "mongodb-legacy": "^4.0.0",
83
+ "mongodb-legacy": "^5.0.0",
84
84
  "nyc": "^15.1.0",
85
- "prettier": "^2.7.1",
86
- "rimraf": "^3.0.2",
85
+ "prettier": "^2.8.4",
87
86
  "semver": "^7.3.8",
88
- "sinon": "^13.0.1",
87
+ "sinon": "^15.0.2",
89
88
  "sinon-chai": "^3.7.0",
90
89
  "snappy": "^7.2.2",
91
90
  "source-map-support": "^0.5.21",
92
91
  "standard-version": "^9.5.0",
93
92
  "ts-node": "^10.9.1",
94
- "tsd": "^0.25.0",
95
- "typescript": "^4.9.4",
93
+ "tsd": "^0.27.0",
94
+ "typescript": "^4.9.5",
96
95
  "typescript-cached-transpile": "^0.0.6",
97
96
  "v8-heapsnapshot": "^1.2.0",
98
97
  "xml2js": "^0.4.23",
99
- "yargs": "^17.6.0"
98
+ "yargs": "^17.7.1"
100
99
  },
101
100
  "license": "Apache-2.0",
102
101
  "engines": {
@@ -109,7 +108,7 @@
109
108
  "scripts": {
110
109
  "build:evergreen": "node .evergreen/generate_evergreen_tasks.js",
111
110
  "build:ts": "node ./node_modules/typescript/bin/tsc",
112
- "build:dts": "npm run build:ts && api-extractor run && rimraf 'lib/**/*.d.ts*'",
111
+ "build:dts": "npm run build:ts && api-extractor run && node etc/clean_definition_files.cjs",
113
112
  "build:docs": "./etc/docs/build.ts",
114
113
  "build:typedoc": "typedoc",
115
114
  "check:bench": "node test/benchmarks/driverBench",
@@ -127,12 +126,12 @@
127
126
  "check:ts": "node ./node_modules/typescript/bin/tsc -v && node ./node_modules/typescript/bin/tsc --noEmit",
128
127
  "check:atlas": "mocha --config test/manual/mocharc.json test/manual/atlas_connectivity.test.js",
129
128
  "check:adl": "mocha --config test/mocha_mongodb.json test/manual/atlas-data-lake-testing",
130
- "check:aws": "mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_aws.test.ts",
131
- "check:oidc": "mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc.test.ts",
129
+ "check:aws": "nyc mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_aws.test.ts",
130
+ "check:oidc": "mocha --config test/manual/mocharc.json test/manual/mongodb_oidc.prose.test.ts",
132
131
  "check:ocsp": "mocha --config test/manual/mocharc.json test/manual/ocsp_support.test.js",
133
- "check:kerberos": "mocha --config test/manual/mocharc.json test/manual/kerberos.test.js",
132
+ "check:kerberos": "nyc mocha --config test/manual/mocharc.json test/manual/kerberos.test.ts",
134
133
  "check:tls": "mocha --config test/manual/mocharc.json test/manual/tls_support.test.js",
135
- "check:ldap": "mocha --config test/manual/mocharc.json test/manual/ldap.test.js",
134
+ "check:ldap": "nyc mocha --config test/manual/mocharc.json test/manual/ldap.test.js",
136
135
  "check:socks5": "mocha --config test/manual/mocharc.json test/manual/socks5.test.ts",
137
136
  "check:csfle": "mocha --config test/mocha_mongodb.json test/integration/client-side-encryption",
138
137
  "check:snappy": "mocha test/unit/assorted/snappy.test.js",
package/src/admin.ts CHANGED
@@ -106,6 +106,8 @@ export class Admin {
106
106
  * @param username - The username for the new user
107
107
  * @param passwordOrOptions - An optional password for the new user, or the options for the command
108
108
  * @param options - Optional settings for the command
109
+ * @deprecated Use the createUser command in `db.command()` instead.
110
+ * @see https://www.mongodb.com/docs/manual/reference/command/createUser/
109
111
  */
110
112
  async addUser(
111
113
  username: string,
@@ -39,7 +39,7 @@ export const BatchType = Object.freeze({
39
39
  } as const);
40
40
 
41
41
  /** @public */
42
- export type BatchType = typeof BatchType[keyof typeof BatchType];
42
+ export type BatchType = (typeof BatchType)[keyof typeof BatchType];
43
43
 
44
44
  /** @public */
45
45
  export interface InsertOneModel<TSchema extends Document = Document> {
@@ -212,37 +212,58 @@ export class BulkWriteResult {
212
212
  return this.result.ok;
213
213
  }
214
214
 
215
- /** The number of inserted documents */
215
+ /**
216
+ * The number of inserted documents
217
+ * @deprecated Use insertedCount instead.
218
+ */
216
219
  get nInserted(): number {
217
220
  return this.result.nInserted;
218
221
  }
219
222
 
220
- /** Number of upserted documents */
223
+ /**
224
+ * Number of upserted documents
225
+ * @deprecated User upsertedCount instead.
226
+ */
221
227
  get nUpserted(): number {
222
228
  return this.result.nUpserted;
223
229
  }
224
230
 
225
- /** Number of matched documents */
231
+ /**
232
+ * Number of matched documents
233
+ * @deprecated Use matchedCount instead.
234
+ */
226
235
  get nMatched(): number {
227
236
  return this.result.nMatched;
228
237
  }
229
238
 
230
- /** Number of documents updated physically on disk */
239
+ /**
240
+ * Number of documents updated physically on disk
241
+ * @deprecated Use modifiedCount instead.
242
+ */
231
243
  get nModified(): number {
232
244
  return this.result.nModified;
233
245
  }
234
246
 
235
- /** Number of removed documents */
247
+ /**
248
+ * Number of removed documents
249
+ * @deprecated Use deletedCount instead.
250
+ */
236
251
  get nRemoved(): number {
237
252
  return this.result.nRemoved;
238
253
  }
239
254
 
240
- /** Returns an array of all inserted ids */
255
+ /**
256
+ * Returns an array of all inserted ids
257
+ * @deprecated Use insertedIds instead.
258
+ */
241
259
  getInsertedIds(): Document[] {
242
260
  return this.result.insertedIds;
243
261
  }
244
262
 
245
- /** Returns an array of all upserted ids */
263
+ /**
264
+ * Returns an array of all upserted ids
265
+ * @deprecated Use upsertedIds instead.
266
+ */
246
267
  getUpsertedIds(): Document[] {
247
268
  return this.result.upserted;
248
269
  }
@@ -74,7 +74,7 @@ export type ResumeToken = unknown;
74
74
  /**
75
75
  * Represents a specific point in time on a server. Can be retrieved by using `db.command()`
76
76
  * @public
77
- * @see https://docs.mongodb.com/manual/reference/method/db.runCommand/#response
77
+ * @see https://www.mongodb.com/docs/manual/reference/method/db.runCommand/#response
78
78
  */
79
79
  export type OperationTime = Timestamp;
80
80
 
@@ -117,19 +117,19 @@ export interface ChangeStreamOptions extends Omit<AggregateOptions, 'writeConcer
117
117
  maxAwaitTimeMS?: number;
118
118
  /**
119
119
  * Allows you to start a changeStream after a specified event.
120
- * @see https://docs.mongodb.com/manual/changeStreams/#resumeafter-for-change-streams
120
+ * @see https://www.mongodb.com/docs/manual/changeStreams/#resumeafter-for-change-streams
121
121
  */
122
122
  resumeAfter?: ResumeToken;
123
123
  /**
124
124
  * Similar to resumeAfter, but will allow you to start after an invalidated event.
125
- * @see https://docs.mongodb.com/manual/changeStreams/#startafter-for-change-streams
125
+ * @see https://www.mongodb.com/docs/manual/changeStreams/#startafter-for-change-streams
126
126
  */
127
127
  startAfter?: ResumeToken;
128
128
  /** Will start the changeStream after the specified operationTime. */
129
129
  startAtOperationTime?: OperationTime;
130
130
  /**
131
131
  * The number of documents to return per batch.
132
- * @see https://docs.mongodb.com/manual/reference/command/aggregate
132
+ * @see https://www.mongodb.com/docs/manual/reference/command/aggregate
133
133
  */
134
134
  batchSize?: number;
135
135
 
@@ -583,7 +583,7 @@ export class ChangeStream<
583
583
  * @internal
584
584
  *
585
585
  * @param parent - The parent object that created this change stream
586
- * @param pipeline - An array of {@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents
586
+ * @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents
587
587
  */
588
588
  constructor(
589
589
  parent: OperationParent,
@@ -1,20 +1,22 @@
1
1
  import type { Document } from '../../bson';
2
2
  import { MongoRuntimeError } from '../../error';
3
- import type { Callback, ClientMetadataOptions } from '../../utils';
4
3
  import type { HandshakeDocument } from '../connect';
5
4
  import type { Connection, ConnectionOptions } from '../connection';
6
5
  import type { MongoCredentials } from './mongo_credentials';
7
6
 
8
- export type AuthContextOptions = ConnectionOptions & ClientMetadataOptions;
9
-
10
- /** Context used during authentication */
7
+ /**
8
+ * Context used during authentication
9
+ * @internal
10
+ */
11
11
  export class AuthContext {
12
12
  /** The connection to authenticate */
13
13
  connection: Connection;
14
14
  /** The credentials to use for authentication */
15
15
  credentials?: MongoCredentials;
16
+ /** If the context is for reauthentication. */
17
+ reauthenticating = false;
16
18
  /** The options passed to the `connect` method */
17
- options: AuthContextOptions;
19
+ options: ConnectionOptions;
18
20
 
19
21
  /** A response from an initial auth attempt, only some mechanisms use this (e.g, SCRAM) */
20
22
  response?: Document;
@@ -24,7 +26,7 @@ export class AuthContext {
24
26
  constructor(
25
27
  connection: Connection,
26
28
  credentials: MongoCredentials | undefined,
27
- options: AuthContextOptions
29
+ options: ConnectionOptions
28
30
  ) {
29
31
  this.connection = connection;
30
32
  this.credentials = credentials;
@@ -32,29 +34,40 @@ export class AuthContext {
32
34
  }
33
35
  }
34
36
 
35
- export class AuthProvider {
37
+ export abstract class AuthProvider {
36
38
  /**
37
39
  * Prepare the handshake document before the initial handshake.
38
40
  *
39
41
  * @param handshakeDoc - The document used for the initial handshake on a connection
40
42
  * @param authContext - Context for authentication flow
41
43
  */
42
- prepare(
44
+ async prepare(
43
45
  handshakeDoc: HandshakeDocument,
44
- authContext: AuthContext,
45
- callback: Callback<HandshakeDocument>
46
- ): void {
47
- callback(undefined, handshakeDoc);
46
+ _authContext: AuthContext
47
+ ): Promise<HandshakeDocument> {
48
+ return handshakeDoc;
48
49
  }
49
50
 
50
51
  /**
51
52
  * Authenticate
52
53
  *
53
54
  * @param context - A shared context for authentication flow
54
- * @param callback - The callback to return the result from the authentication
55
55
  */
56
- auth(context: AuthContext, callback: Callback): void {
57
- // TODO(NODE-3483): Replace this with MongoMethodOverrideError
58
- callback(new MongoRuntimeError('`auth` method must be overridden by subclass'));
56
+ abstract auth(context: AuthContext): Promise<void>;
57
+
58
+ /**
59
+ * Reauthenticate.
60
+ * @param context - The shared auth context.
61
+ */
62
+ async reauth(context: AuthContext): Promise<void> {
63
+ if (context.reauthenticating) {
64
+ throw new MongoRuntimeError('Reauthentication already in progress.');
65
+ }
66
+ try {
67
+ context.reauthenticating = true;
68
+ await this.auth(context);
69
+ } finally {
70
+ context.reauthenticating = false;
71
+ }
59
72
  }
60
73
  }