bigcommerce / nextjs-commerce

Next.js Commerce
https://next-commerce-v2.vercel.app
MIT License
92 stars 81 forks source link

Add Customer Impersonation Token to ENV #17

Closed bc-alexsaiannyi closed 1 year ago

bc-alexsaiannyi commented 1 year ago

What/Why

Previously, we've auto generated a Customer Impersonation Token (CIT) on each GraphQL request within bigCommerceFetch method. Now we change the logic and move this step on the side of User. That means from now on User should generate CIT by himself/herself and put it on .env file and regenerate once it is going to expire. README is updated with link to our docs how to generate CIT via endpoint.

Additionally, revalidate option has been removed from fetching so only cache: force-cache option is stayed in place. This removes next warning:

Warning: fetch for https://store-xxx.mybigcommerce.com/graphql on ... specified "cache: force-cache" and "revalidate: 900", only one should be specified.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextjs-commerce ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 10:35am