File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828 AnyOptions ,
2929 Callback ,
3030 DEFAULT_PK_FACTORY ,
31+ emitWarning ,
3132 emitWarningOnce ,
3233 HostAddress ,
3334 isRecord ,
@@ -640,19 +641,21 @@ export const OPTIONS = {
640641 'AWS_SESSION_TOKEN'
641642 ] ;
642643
643- const properties = Object . create ( null ) ;
644+ const mechanismProperties = Object . create ( null ) ;
644645
645646 for ( const [ key , _value ] of entriesFromString ( value ) ) {
646647 if ( validKeys . includes ( key ) ) {
647648 if ( key === 'CANONICALIZE_HOST_NAME' ) {
648- properties [ key ] = getBoolean ( key , _value ) ;
649+ mechanismProperties [ key ] = getBoolean ( key , _value ) ;
649650 } else {
650- properties [ key ] = _value ;
651+ mechanismProperties [ key ] = _value ;
651652 }
652653 }
653654 }
654655
655- value = properties ;
656+ return MongoCredentials . merge ( options . credentials , {
657+ mechanismProperties
658+ } ) ;
656659 }
657660 if ( ! isRecord ( value ) ) {
658661 throw new MongoParseError ( 'AuthMechanismProperties must be an object' ) ;
You can’t perform that action at this time.
0 commit comments