Hi. MongoDB Atlas seems to be a convenient data storage option for JSON data to be used with Composer Pro. But is it possible to access data from MongoDB Atlas requiring HTTP Digest authentication? Is that supported by AppGyver related to external data sources? Have you tested this data storage by any chance? Thanks.
Looking at e.g. https://stackoverflow.com/questions/48545933/is-it-possible-to-use-digest-auth-with-fetch-in-react-native it seems that some additional native functionality is required to enable Digest Auth support. I made a tracker ticket to follow at https://tracker.appgyver.com/feature-requests/p/http-digest-auth-support
That said, you would want to keep your MongoDB Atlas secrets in a backend and e.g. only provide a short-lived auth token to authenticated users to access that backend. Thus, even if Digest Auth was possible directly from the mobile/web client app, it would not be a secure architecture, as someone getting access to the app binary would be able to scrape the secrets and start accessing your API outside the app.
So for now, it looks like the way to access MongoDB Atlas would be to create a simple proxy server that works with e.g. a Authorization header token between the client and the proxy server, and then Digest Auth between the proxy server and MongoDB Atlas.
As we work on our cloud offering throughout early 2020, we’ll be sure to take this use case into account and perhaps even build a one-click integration to MongoDB Atlas!
Here is a new tutorial we have released on working with MongoDB Atlas and MongoDB Realm:
I think it should directly answer your questions.
I’ve been working through the above-mentioned tutorial EXACTLY as documented, but after posting on the MongoDB forum as well as this one, I’m starting to become a bit despondent - I’ve had no replies.
I know it must have worked when you first created the tutorial, but now it’s not. A simple Postman call fails to return any results - so it’s not an AppGyver problem, and yes I have populated the database with records as the list of movies returns 100 records as per your example.
This is my post on this forum…
I would really appreciate it if you could have a quick look. I’m at that point where I’m about to throw in the towel and move to Xano or some other document DB.
hi @KapaiNZ ,
I am sorry you have issue with parts of the tutorial. Unfortunately the link you gave me is private and I cannot view it…
Please let me know how else can I help you?
Thanks for getting back to me so quickly!
That’s strange…this is the share link it gave me…so perhaps this will work?
If not this is the duplicate on the MongoDb forum.
I’ve figured out what the problem was. I needed to Create an Atlas Search Index using the Atlas UI as documented here… https://docs.atlas.mongodb.com/reference/atlas-search/tutorial/create-index-ui/
Perhaps you could make note of that in your tutorial, just in case others get stuck?
Until I did this, it would always return an empty array (if a non-empty search param was passed) and I also noticed that sometimes the queryParam I passed was not even received. It appears to be working perfectly now.
One final thing - there’s a typo in this string…
'path': ['title', 'plot','fullplot','generes'],
…‘generes’ is the wrong spelling.
Thanks again for your help!
Hi there @KapaiNZ
After creating the atlas search index, what should I do ?
What endpoint should I use to make the queries ?
At Appgyver are you using the default rest API data connection ? If yes, are you using a GET method get all collection results ?
Thanks a lot man! and sorry for the amount of questions