Skip to content

Commit 96f1173

Browse files
authored
fix(devtools-connect): bump mongodb to latest and fix OIDC option check MONGOSH-1831 (#407)
1 parent e1c598a commit 96f1173

File tree

5 files changed

+31
-30
lines changed

5 files changed

+31
-30
lines changed

package-lock.json

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/devtools-connect/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
},
5656
"peerDependencies": {
5757
"@mongodb-js/oidc-plugin": "^1.0.0",
58-
"mongodb": "^5.8.1 || ^6.0.0",
58+
"mongodb": "^6.8.0",
5959
"mongodb-log-writer": "^1.4.2"
6060
},
6161
"devDependencies": {
@@ -75,7 +75,7 @@
7575
"eslint-plugin-promise": "^6.1.1",
7676
"gen-esm-wrapper": "^1.1.0",
7777
"mocha": "^8.4.0",
78-
"mongodb": "^5.8.1 || ^6.0.0",
78+
"mongodb": "^6.8.0",
7979
"mongodb-log-writer": "^1.4.2",
8080
"nyc": "^15.1.0",
8181
"os-dns-native": "^1.2.0",

packages/devtools-connect/src/connect.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,20 +429,20 @@ describe('devtools connect', function () {
429429
).to.equal(true);
430430
});
431431

432-
it('returns false if the PROVIDER_NAME JS option is set', function () {
432+
it('returns false if the ENVIRONMENT JS option is set', function () {
433433
expect(
434434
isHumanOidcFlow('mongodb://example/?authMechanism=MONGODB-OIDC', {
435435
authMechanismProperties: {
436-
PROVIDER_NAME: 'aws',
436+
ENVIRONMENT: 'azure',
437437
},
438438
})
439439
).to.equal(false);
440440
});
441441

442-
it('returns false if the PROVIDER_NAME url option is set', function () {
442+
it('returns false if the ENVIRONMENT url option is set', function () {
443443
expect(
444444
isHumanOidcFlow(
445-
'mongodb://example/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:aws',
445+
'mongodb://example/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure',
446446
{}
447447
)
448448
).to.equal(false);

packages/devtools-connect/src/connect.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ export function isHumanOidcFlow(
471471
if (
472472
(clientOptions.authMechanism &&
473473
clientOptions.authMechanism !== 'MONGODB-OIDC') ||
474-
clientOptions.authMechanismProperties?.PROVIDER_NAME
474+
clientOptions.authMechanismProperties?.ENVIRONMENT ||
475+
clientOptions.authMechanismProperties?.OIDC_CALLBACK
475476
) {
476477
return false;
477478
}
@@ -487,7 +488,7 @@ export function isHumanOidcFlow(
487488
return (
488489
authMechanism === 'MONGODB-OIDC' &&
489490
!new CommaAndColonSeparatedRecord(sp.get('authMechanismProperties')).get(
490-
'PROVIDER_NAME'
491+
'ENVIRONMENT'
491492
)
492493
);
493494
}

packages/mongodb-runner/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"dependencies": {
5353
"@mongodb-js/mongodb-downloader": "^0.3.2",
5454
"debug": "^4.3.4",
55-
"mongodb": "^6.3.0",
55+
"mongodb": "^6.8.0",
5656
"@mongodb-js/saslprep": "^1.1.7",
5757
"mongodb-connection-string-url": "^3.0.0",
5858
"yargs": "^17.7.2"

0 commit comments

Comments
 (0)