Shopify / shopify-app-template-php

287 stars 93 forks source link

Signature verification failed #408

Open michaellindahl opened 1 year ago

michaellindahl commented 1 year ago

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

  1. Run Shopify CLI and use the PHP template.
  2. Deploy to production server using composer install and SHOPIFY_API_KEY=** npm run build
  3. Install the app to a test store using Test your app > Select store.

Reduced test case

Deploy the Shopify CLI PHP template.


Checklist

DtCtv129 commented 1 year ago

I am facing the same problem here ,did you figured it out ?