
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
stitching-react
Advanced tools
A React module to use Stitching in an easy way.
$ npm install stitching-react
Stitching React makes easier the usage of Stitching, a module running on top of MongoDB Stitch.
Before using Stitching, you need to setup a MongoDB Stitch app. To get started, you can visit Getting Started page and follow the instructions. After you finish setting up a MongoDB Stitch app, you can use your APP ID to handle Authentication.
Before registering an user, you need to enable email/password authentication in MongoDB Stitch (Authentication -> Providers -> Email/Password):
Inside MongoDB Stitch, go to your Atlas Cluster and create a new collection:
After you created your collection, you need to set the next Field Rules:
READ (Only the owner of a document can read it)
{
"owner_id": "%%user.id"
}
WRITE (Anyone can create a new document, but only the owner of a document can write to it)
{
"%or": [
{
"%%prevRoot.owner_id": "%%user.id"
},
{
"%%prevRoot": {
"%exists": false
}
}
]
}
VALID
"%%user.id"
Note: Email/Password authentication doesn't handle metadata out of the box. This means that after login to your MongoDB Stitch app, you don't have other information regarding the email. We need a collection to save user name, date of birth, address, etc. This is optional and we can skip this step.
If you don't want to use Stitching module on his own, you can use Stitching React to connect.
const StitchingReact = require("stitching-react");
// Configuration
const APP_ID = "example-<random_value>";
const CLUSTER = "mongodb-atlas";
const DB = "example";
const ENDPOINT = "https://stitch.mongodb.com";
const METADATA = "metadata"; // Optional collection name to handle user metadata (I.E. name, dob, profile_image, etc)
// Connect to MongoDB Stitch app
StitchingReact.connect(APP_ID, ENDPOINT, CLUSTER, DB, METADATA);
After you connect your Stitching React, you can use all components to register users, confirm emails, login and update metadata.
Note: Stitching React internally uses Stitching. You only need to connect Stitching once (using Stitching directly or Stitching React).
For a demo project, go to Stitching React Example
FAQs
A React module to use Stitching in an easy way.
We found that stitching-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.