We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

No session or admin after authenticate of webhook request

Solved

No session or admin after authenticate of webhook request

peterandersen
Shopify Partner
14 1 5

We are trying to authenticate a session against Shopify on a incoming webhook request in our webhooks.jxs

 

 
    const result = await authenticate.webhook(request);
    ({ shop, topic, session, admin, payload } = result);
 

after this call session and admin are both undefined.

 

We have registered the webhook in our toml file - but also tried to do it in the shopify.server.js file.

 

We created the project a branch with the webhook solution on the app 2 month ago, at this point the solution was working, now it impossible to get to work.

We tried the solution listed in:
https://github.com/Shopify/shopify-app-template-remix/issues/796 and
https://github.com/Shopify/shopify-app-template-remix/issues/462 
with no lock.

 

We have look in the dev.sqlite database, the session table is empty.

Any one that have any suggestion on what to do?  

 

 

 

Accepted Solution (1)

peterandersen
Shopify Partner
14 1 5

This is an accepted solution.

We only use our embedded app to receive webhook, we do not have any configuration within the Shopify shop admin.

For that reason we had pruned the app. In that process we removed

app/routes/_index/route.jsx  

This is where the token exchange happen.

 

Adding that and going to the (empty) app page on the shop, add a session and it work on the following webhook request

 

 

 

View solution in original post

Reply 1 (1)

peterandersen
Shopify Partner
14 1 5

This is an accepted solution.

We only use our embedded app to receive webhook, we do not have any configuration within the Shopify shop admin.

For that reason we had pruned the app. In that process we removed

app/routes/_index/route.jsx  

This is where the token exchange happen.

 

Adding that and going to the (empty) app page on the shop, add a session and it work on the following webhook request