mongodb-stitch

Why my mongodb-stitch service return me the value type ($numberLong, $numberInt,…)?

China☆狼群 提交于 2020-07-06 20:00:21
问题 Why my mongodb-stitch service return me the type of value ($numberLong, $numberInt,…) while the Compass application do not do ? How to have the same varialble format like in Compas or how to handle this with Stitch ? Mongodb-stitch enter image description here Compass enter image description here 回答1: MongoDB Stitch functions have access to utility packages provided through various global variables. And some of them are below: https://docs.mongodb.com/stitch/functions/utilities/ JSON EJSON

Use Google Firebase Authentication without 3rd Party Cookies

元气小坏坏 提交于 2020-01-11 05:48:06
问题 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 policy. Google Firebase Authentication uses 3rd party cookies and so if I try to use Firebase, I'm redirected to the Google page (as expected) but when I'm redirected back to the originating webpage after logging in (and Firebase tries to set cookies), I

How to get Jest to see the functions I am writing for MongoDB Stitch?

痞子三分冷 提交于 2020-01-05 11:12:48
问题 I am trying out Stitch, a serverless/hosted JavaScript environment from MongoDB. My main purpose is to help me learn modern JavaScript, but I am trying to write a useful app as well. I have written the following function, and saved it in my Stitch app. I believe this follows the documented way to write functions in Stitch, and I have tested it from the Stitch administration console: exports = function(query){ const http = context.services.get("HTTP"); const urlBase = context.values.get(

How to get Jest to see the functions I am writing for MongoDB Stitch?

99封情书 提交于 2020-01-05 11:12:05
问题 I am trying out Stitch, a serverless/hosted JavaScript environment from MongoDB. My main purpose is to help me learn modern JavaScript, but I am trying to write a useful app as well. I have written the following function, and saved it in my Stitch app. I believe this follows the documented way to write functions in Stitch, and I have tested it from the Stitch administration console: exports = function(query){ const http = context.services.get("HTTP"); const urlBase = context.values.get(

Expired token for Email/Password Authentication using Mongodb-stitch JS API

匆匆过客 提交于 2019-12-24 07:48:51
问题 I have a mongodb altas cluster on cloud.mongodb.com. As per the instructions in https://docs.mongodb.com/stitch/auth/email-auth/ I was able to register an email/password pair. About 12 hours later I received the confirmation email. I visited the link in the confirmation email yet 12 hours later. Chrome browser developer tools tells me that the server returned HTTP 400 and body: {"error": "the token is expired or invalid"} I think the token has expired, but when I tried to register the same

Can a Mongo Stitch app be renamed in the web UI?

做~自己de王妃 提交于 2019-12-16 18:06:10
问题 I am trying Mongo Stitch to see if I can use it for some small web apps. I created a simple application to play with some incoming web hooks and triggers, and called it MyApp . I am now expanding the application, and I have a purpose for it, so I'd like to give it a more meaningful name. However, on the Stitch Applications page, the only feature available in the app context menus is "Delete". I expect I could do an export and an import using the console command, and editing the text files in

Signup not working - Server returns 404 Error Code

為{幸葍}努か 提交于 2019-12-10 22:05:06
问题 MongoDB Stitch: iOS SDK - Signup Issue: I tried this: let stitchClient = StitchClient(appId: "<my-app-id>") stitchClient.register(email: email, password: password).then({ () in print("Signed up here") }) .catch({ (err) in print("Sign up fu**ed up: \(err)") }) and always getting this: responseParsingFailed("Received no valid data from server"). When I hit the signup URL(https://stitch.mongodb.com/api/client/v2.0/app/my-app-name/auth/providers/local-userpass/register/) with these params ({

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

巧了我就是萌 提交于 2019-12-06 11:49:50
问题 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 and hydrate the app on the server. With Google Firebase Auth you can even do this by passing a token in the request and collecting the user on the server side using that token. I'm not sure how this would work with Stitch, though. Documentation