You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-57Lines changed: 4 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,28 +153,6 @@ Embedded apps must maintain the user session, which can be tricky inside an iFra
153
153
154
154
This only applies if your app is embedded, which it will be by default.
155
155
156
-
### App goes into a loop when I change my app's scopes
157
-
158
-
If you change your app's scopes and authentication goes into a loop before failing after trying too many times, you might have forgotten to update your scopes with Shopify. Update your scopes.
If you are registering webhooks in the `afterAuth` hook, using `shopify.registerWebhooks`, you may find that your subscriptions aren't being updated.
@@ -218,45 +196,14 @@ By default the CLI uses a cloudflare tunnel. Unfortunately cloudflare tunnels w
218
196
219
197
To test [streaming using await](https://reactrouter.com/api/components/Await#await) during local development we recommend [localhost based development](https://shopify.dev/docs/apps/build/cli-for-apps/networking-options#localhost-based-development).
220
198
221
-
### Using MongoDB and Prisma
222
-
223
-
By default this template uses SQLlite as the database. It is recommended to move to a persisted database for production. If you choose to use MongoDB, you will need to make some modifications to the schema and prisma configuration. For more information please see the [Prisma MongoDB documentation](https://www.prisma.io/docs/orm/overview/databases/mongodb).
224
-
225
-
Alternatively you can use a MongDB database directly with the [MongoDB session storage adapter](https://github.com/Shopify/shopify-app-js/tree/main/packages/apps/session-storage/shopify-app-session-storage-mongodb).
226
-
227
-
#### Mapping the id field
228
-
229
-
In MongoDB, an ID must be a single field that defines an `@id` attribute and a `@map("\_id")` attribute.
230
-
The prisma adapter expects the ID field to be the ID of the session, and not the \_id field of the document.
231
-
232
-
To make this work add a new field to the schema that maps the \_id field to the id field. For more information see the [Prisma documentation](https://www.prisma.io/docs/orm/prisma-schema/data-model/models#defining-an-id-field)
#### Error: The "mongodb" provider is not supported with this command
243
-
244
-
MongoDB does not support the [prisma migrate](https://www.prisma.io/docs/orm/prisma-migrate/understanding-prisma-migrate/overview) command. Instead, you can use the [prisma db push](https://www.prisma.io/docs/orm/reference/prisma-cli-reference#db-push) command and update the `shopify.web.toml` file with the following commands. If you are using MongoDB please see the [Prisma documentation](https://www.prisma.io/docs/orm/overview/databases/mongodb) for more information.
245
-
246
-
```toml
247
-
[commands]
248
-
predev = "npx prisma generate && npx prisma db push"
#### Prisma needs to perform transactions, which requires your mongodb server to be run as a replica set
253
-
254
-
See the [Prisma documentation](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/mongodb/connect-your-database-node-mongodb) for connecting to a MongoDB database.
255
-
256
199
### "nbf" claim timestamp check failed
257
200
258
201
This is because a JWT token is expired. If you are consistently getting this error, it could be that the clock on your machine is not in sync with the server. To fix this ensure you have enabled "Set time and date automatically" in the "Date and Time" settings on your computer.
259
202
203
+
### Using MongoDB and Prisma
204
+
205
+
If you choose to use MongoDB with Prisma, there are some gotchas in Prisma's MongoDB support to be aware of. Please see the [Prisma SessionStorage README](https://www.npmjs.com/package/@shopify/shopify-app-session-storage-prisma#mongodb).
0 commit comments