I have just created an shopify app using Shopify cli command. After successfully create the app boilerplate I run the app using yarn run dev command and it successfully run and provided me an URL and I install the app in my store. But I see I am getting 401 authentication error. Here is my error message below
Response {
[Symbol(realm)]: { settingsObject: {} },
[Symbol(state)]: {
aborted: false,
rangeRequested: false,
timingAllowPassed: false,
requestIncludesCredentials: false,
type: 'default',
status: 401,
timingInfo: null,
cacheState: '',
statusText: 'Unauthorized',
headersList: HeadersList {
cookies: null,
[Symbol(headers map)]: [Map],
[Symbol(headers map sorted)]: null
},
urlList: []
},
[Symbol(headers)]: HeadersList {
cookies: null,
[Symbol(headers map)]: Map(1) { 'x-shopify-retry-invalid-session-request' => [Object] },
[Symbol(headers map sorted)]: null
}
}
I have cleared my cache , session , local storage several times but still facing the same 401 issue. I have created and .env file under app folder and put SHOPIFY_API_SECRET,SHOPIFY_API_KEY variable from the app configuration. How can I solve the issue ? I have attached the screenshot below.