Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mongodb-js/oidc-plugin

Package Overview
Dependencies
Maintainers
0
Versions
26
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.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
87K
increased by114.88%
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 25 Nov 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc