Skip to content

DOCSP-42373 Update username and password placeholders #899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/code-snippets/authentication/cr.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { MongoClient } = require("mongodb");

// Replace the following with values for your environment.
const username = encodeURIComponent("<username>");
const password = encodeURIComponent("<password>");
const username = encodeURIComponent("<db_username>");
const password = encodeURIComponent("<db_password>");
const clusterUrl = "<MongoDB cluster url>";

// Replace the following with your MongoDB deployment's connection string.
Expand Down
4 changes: 2 additions & 2 deletions source/code-snippets/authentication/default.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { MongoClient } = require("mongodb");

// Replace the following with values for your environment.
const username = encodeURIComponent("<username>");
const password = encodeURIComponent("<password>");
const username = encodeURIComponent("<db_username>");
const password = encodeURIComponent("<db_password>");
const clusterUrl = "<MongoDB cluster url>";

const authMechanism = "DEFAULT";
Expand Down
4 changes: 2 additions & 2 deletions source/code-snippets/authentication/sha1.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { MongoClient } = require("mongodb");

// Replace the following with values for your environment.
const username = encodeURIComponent("<username>");
const password = encodeURIComponent("<password>");
const username = encodeURIComponent("<db_username>");
const password = encodeURIComponent("<db_password>");
const clusterUrl = "<MongoDB cluster url>";

const authMechanism = "SCRAM-SHA-1";
Expand Down
4 changes: 2 additions & 2 deletions source/code-snippets/authentication/sha256.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { MongoClient } = require("mongodb");

// Replace the following with values for your environment.
const username = encodeURIComponent("<username>");
const password = encodeURIComponent("<password>");
const username = encodeURIComponent("<db_username>");
const password = encodeURIComponent("<db_password>");
const clusterUrl = "<MongoDB cluster url>";

const authMechanism = "SCRAM-SHA-256";
Expand Down
2 changes: 1 addition & 1 deletion source/connection-troubleshooting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ database:
:copyable: true

const { MongoClient } = require("mongodb");
const uri = "mongodb://<username>:<password>@<hostname>:<port>/?authSource=users";
const uri = "mongodb://<db_username>:<db_password>@<hostname>:<port>/?authSource=users";
const client = new MongoClient(uri);

You can check if this is the issue by attempting to connect to a MongoDB
Expand Down
4 changes: 2 additions & 2 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,9 @@ Authentication

.. code-block:: js

new MongoClient("mongodb://username:password@<host><port>")
new MongoClient("mongodb://<db_username>:<db_password>@<host><port>")
// or
new MongoClient(url, { auth: { username: "<>", password: "<>" } })
new MongoClient(url, { auth: { username: "<db_username>", password: "<db_password>" } })

``GridStore`` Removal
`````````````````````
Expand Down
Loading