Skip to content

Commit

Permalink
Update the template to support shopify-app-remix v3 and user session
Browse files Browse the repository at this point in the history
  • Loading branch information
lizkenyon committed May 30, 2024
1 parent 70da47e commit 1709218
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
3 changes: 0 additions & 3 deletions app/shopify.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ const shopify = shopifyApp({
},
},
future: {
v3_webhookAdminContext: true,
v3_authenticatePublic: true,
v3_lineItemBilling: true,
unstable_newEmbeddedAuthStrategy: true,
},
...(process.env.SHOP_CUSTOM_DOMAIN
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@shopify/cli": "^3.57.1",
"@shopify/app-bridge-react": "^4.1.2",
"@shopify/polaris": "^12.0.0",
"@shopify/shopify-api": "^10.0.0",
"@shopify/shopify-app-remix": "^2.8.2",
"@shopify/shopify-app-session-storage-prisma": "^4.0.5",
"@shopify/shopify-api": "^11.0.0",
"@shopify/shopify-app-remix": "^3.0.0",
"@shopify/shopify-app-session-storage-prisma": "^5.0.0",
"isbot": "^5.1.0",
"prisma": "^5.11.0",
"react": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ CREATE TABLE "Session" (
"scope" TEXT,
"expires" DATETIME,
"accessToken" TEXT NOT NULL,
"userId" BIGINT
"userId" BIGINT,
"firstName" TEXT,
"lastName" TEXT,
"email" TEXT,
"accountOwner" BOOLEAN NOT NULL DEFAULT false,
"locale" TEXT,
"collaborator" BOOLEAN DEFAULT false,
"emailVerified" BOOLEAN DEFAULT false
);
3 changes: 3 additions & 0 deletions prisma/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"
23 changes: 15 additions & 8 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@ datasource db {
}

model Session {
id String @id
shop String
state String
isOnline Boolean @default(false)
scope String?
expires DateTime?
accessToken String
userId BigInt?
id String @id
shop String
state String
isOnline Boolean @default(false)
scope String?
expires DateTime?
accessToken String
userId BigInt?
firstName String?
lastName String?
email String?
accountOwner Boolean @default(false)
locale String?
collaborator Boolean? @default(false)
emailVerified Boolean? @default(false)
}

0 comments on commit 1709218

Please sign in to comment.