Questions tagged [mongodb-stitch]

For questions related to the MongoDB Stitch Service API.

Stitch allows building an API for a MongoDB back end and other integrated services by concentrating on application logic rather than detail of delivery for data manipulation code.

Documentation is available at https://docs.mongodb.com/stitch/

And there are various tutorials available: https://docs.mongodb.com/stitch/tutorials/

165 questions
9
votes
0 answers

How to query MongoDB aggregate with collation option

I created a "brands" collection and then added an index collation: { locale: "en", strength: 2} on the "title" field. But when I try to query it using this collation it doesn't work as expected: const query = brand =>…
Andrei Roba
  • 2,156
  • 2
  • 16
  • 33
9
votes
5 answers

MongoDB atlas trigger getting error: TypeError: Cannot access member 'db' of undefined

I am a newbie trying MongoDB-atlas free tier. I have a cluster named - "mongoCluster. Under it, I have a database - "testdb" and under it, have a collection - "testcollection". This collection has documents. The inserts and read from my java app are…
Anurag
  • 345
  • 1
  • 5
  • 19
7
votes
1 answer

How to use MongoDB Stitch Auth in isomorphic or SSR app?

Would like to use Stitch in a NextJS app (basically isomorphic react). Normally, you would be able to pass a JWT or session token in the headers of the initial request, and if the user already has a session you can immediately load all of their data…
Andrew Stover
  • 301
  • 2
  • 5
7
votes
3 answers

MongoDB Stitch throwing anon-user error

I am using mongodb's stitch backend to run an application, and when I try to login as an anonymous user, it throws this error: failed to log in anonymously: { StitchError: authentication via 'anon-user' is unsupported at…
Spaceface16518
  • 101
  • 3
  • 8
7
votes
1 answer

Use Google Firebase Authentication without 3rd Party Cookies

I'm currently experimenting with Social Media Sign-in and have realised something slightly strange on how these logins are delivered which is stemming from the fact that my workplace, like most offices, blocks 3rd party cookies as a security…
5
votes
2 answers

How to fix "Result undefined" in MongoDB Stitch function

I'm creating Stitch Functions in MongoDB and getting result undefined instead of double. I'm developing an iOS App, using MongoDB database. I'm creating Stitch Functions, and using callFunction(withName:withArgs:_:) method. I write a function to…
Ece
  • 51
  • 3
5
votes
2 answers

Update user profile on MongoDB Stitch

I've been able to do a register and login using MongoDB Stitch but I can't find how to update a user's data. I've tried making queries to db.users or db.user but these don't exist. Is there a method to update a user?
facumedica
  • 658
  • 1
  • 7
  • 20
5
votes
1 answer

How to increment existing value in MongoDB

I am using Stitch platform by MongoDB. I want to store a value and a count associated with that value in the database. Now the value may not be present for the first time, so I would like to insert the value with count = 1. I can use update() to…
Nikhil Wagh
  • 1,376
  • 1
  • 24
  • 44
4
votes
1 answer

Stitch function updateOne errors "update not permitted"

I have a Stitch function that does a couple of things and I'm getting an error at this line: try { // voteAsObjectId is the Id of the photo to vote converted to BSON.ObjectId. await db .collection('photos') .updateOne({ "_id":…
DoHn
  • 625
  • 7
  • 15
4
votes
2 answers

Uploading images to s3 through stitch aws service fails

Sorry I am a noob, but I am building a quasar frontend using mongodb stitch as backend. I am trying to upload an image using the stitch javascript sdks and the AwsRequest.Builder. Quasar gives me an image object with base64 encoded data. I remove…
4
votes
1 answer

How Custom Authentication Works in MongoDB Stitch

Following MongoDB Custom Authentication, it is given that any JWT Token with the minimal below fields works with the MongoDB Stitch Authentication. Also, token needs to be issued by External Authentication System { "aud": "" …
Hary
  • 5,690
  • 7
  • 42
  • 79
4
votes
1 answer

How to get AWS S3 signed URL with mongoDB Stitch?

I'm trying to retrieve some files from a S3 bucket, but the files are setup to be private. I'm currently using ListObjects to retrieve all the files in my bucket, but on the result set it does not include the signed url and since the file is private…
Ennio
  • 1,147
  • 2
  • 17
  • 34
3
votes
1 answer

MongoDB Stitch returns data as $NumberDouble instead of the number itself

I'm using MongoDB Stitch to create a data enabled API, but when I make a GET request, the data is returned where numbers are displayed as: "firstHit": { "$numberInt": "3" Where I would like them to be return just as: "firstHit": 3 I have a lot…
ClaytonO
  • 31
  • 2
3
votes
1 answer

Create Mongodb Atlas Triggers Programmatically | Nodejs

I am planning to create few triggers in mongodb atlas using nodejs. I found mongodb-stitch-server-sdk library which kind of helps me to connect to stitch application but I couldn't find anything which can help me create a trigger. Can anyone point…
Ashish Modi
  • 7,529
  • 2
  • 20
  • 35
3
votes
1 answer

Does MongoDB Stitch Functions support async/await definitions?

Asynchronous function definitions on MongoDB (Atlas) Stitch display warnings on the GUI editor. Including the example code provided on the reference for Triggers. The code found here can be was copied over directly to the Stitch Function editor and…
karloluis
  • 209
  • 2
  • 13
1
2 3
10 11