Hello Everyone, I’m new to Shopify App Development and Want to use a Node template for Development instead of Remix, with MongoDB database.
I want help from you guys on the following topics(because of not understand docs and not finding what I want to do):-
I want to use the MongoDB database and when I use the default “@shopify/shopify-app-session-storage-sqlite” it saves stores sessions in the local file but when use “@shopify/shopify-app-session-storage-mongodb” store offline session in the “Shopify_sessions” Named collection automatically at the time of installation of app on stores. Now I have following issues/doubt.
- is “res.locals.shopify.session” is enough for session validation for APIs in the Backend without storing and using it from the Database.
- If the first doubt answer is no then, is this automatically saved session enough for production as well?
- If both doubts answers are No, then how can I save it, and when to save the online session in my database? Because I have tried to save it in the database as per the “https://github.com/Shopify/shopify-api-js/blob/main/packages/shopify-api/docs/guides/session-storage.md”
but failed. - The sessions will expire after 24 hours then Shopify automatically updates it or needs to build custom logic for it.

