I am trying to create a Shopify public app with firebase database. All working with local but not authenticating with Heroku. It’s deploying fine but not loading the app (showing application error)
On log it will showing some error like
I’m following these tutorial https://medium.com/code-undefined/how-to-deploy-your-shopify-react-app-to-heroku-5dbc5a51738
Here is my server.js
https://github.com/amit-codeking/notification-bar/blob/master/server/server.js
Thanks in advance for you help!
2
Answers
The app is looking for the
API_SECRET_KEY
config value to be defined, but it is not. This is causing theparams.API_SECRET_KEY.length
line to error, as it cannot call.length
onparams.API_SECRET_KEY
due to it resolving asundefined
.You can follow the Heroku documentation to add this config value to your Heroku app. It seems as though the blog has it mislabeled as
SHOPIFY_API_SECRET_KEY
so you may just need to rename that config value to match what your application is expecting. You may hit the same error withSHOPIFY_API_KEY
just beingAPI_KEY
as well, so be on the look out.The correct config vars are:
SHOPIFY_API_KEY
SHOPIFY_API_SECRET
I furthermore had to configure
HOST
andSCOPES
.