New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mongodb-js/oidc-plugin

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mongodb-js/oidc-plugin

MongoDB OIDC plugin for the Node.js driver

1.1.6
latest
Source
npm
Version published
Weekly downloads
60K
-7.35%
Maintainers
0
Weekly downloads
 
Created
Source

@mongodb-js/oidc-plugin

A plugin for the MongoDB Node.js driver to support human/browser-based OIDC authentication flows.

OIDC support is a preview feature of MongoDB and not currently recommended for production usage.

Example usage

import { MongoClient } from 'mongodb';
import { createMongoDBOIDCPlugin } from '@mongodb-js/oidc-plugin';

// All config options are optional.
const config = {
  openBrowser: {
    command: 'open -a "Firefox"',
  },
  // allowedFlows: ['auth-code', 'device-auth'], // if Device Auth Grant flow is required
};

const client = await MongoClient.connect(
  'mongodb+srv://.../?authMechanism=MONGODB-OIDC',
  {
    ...createMongoDBOIDCPlugin(config).mongoClientOptions,
  }
);

// ...

See the TypeScript annotations for more API details.

FAQs

Package last updated on 27 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts