I used the CLI, and successfully created an app using npm run dev and ngrok into the local install. However, once I deployed to production I ran into both a "CSRF token mismatch" and "Firebase\JWT\SignatureInvalidException: Signature verification failed" error.
In order to resolve the CSRF issue I removed the middleware, which probably isn't the best solution.
However, I'm stumped on how to resolve the JWT issue.
Expected behavior
After following the official Shopify tutorial and deploying to production, the application should work successfully.
Actual behavior
Production installs result in CSRF and JWT issues.
Steps to reproduce the problem
Run Shopify CLI and use the PHP template.
Deploy to production server using composer install and SHOPIFY_API_KEY=** npm run build
Install the app to a test store using Test your app > Select store.
Reduced test case
Deploy the Shopify CLI PHP template.
Checklist
[x] I have described this issue in a way that is actionable (if possible)
Issue summary
I used the CLI, and successfully created an app using
npm run dev
and ngrok into the local install. However, once I deployed to production I ran into both a "CSRF token mismatch" and "Firebase\JWT\SignatureInvalidException: Signature verification failed" error.In order to resolve the CSRF issue I removed the middleware, which probably isn't the best solution.
However, I'm stumped on how to resolve the JWT issue.
Expected behavior
After following the official Shopify tutorial and deploying to production, the application should work successfully.
Actual behavior
Production installs result in CSRF and JWT issues.
Steps to reproduce the problem
composer install
andSHOPIFY_API_KEY=** npm run build
Test your app > Select store
.Reduced test case
Deploy the Shopify CLI PHP template.
Checklist