Facing issue with for authetication the shopify app by using of session.

Aniket546
New Member
3 0 1

Hello Team , I have developed an app for create product in shopify and the app is working fine when I use @Shopify/koa-shopify-auth version "3.2.0" . But when I used updated version "4.0.1" of @Shopify/koa-shopify-auth it's breaking the app and getting a 500 error. Can you please describe me how can i integrate auth process for my app and make api call's
I need to use session instead of cookies for tokens.
Here is my code
await axios({
method: 'post',
url: https://16584e4685ff.ngrok.io/graphql,
data: { query: `query {
shop{
id
email
name
url
domains {
id
host
}
}
}` },
headers: {
'Content-Type': 'application/json',

"Authorization": `Bearer ${sessionToken}`
});

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
244 32 45

Hey @Aniket546 

I'd suggest reviewing: https://shopify.dev/tutorials/authenticate-your-app-using-session-tokens

Kevin_A | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes