Shopify / koa-shopify-auth

DEPRECATED Middleware to authenticate a Koa application with Shopify
MIT License
80 stars 63 forks source link

API Deprecation Notice from metafields API call to verify oauth #118

Closed avocadoslab closed 2 years ago

avocadoslab commented 3 years ago

Issue summary

When app doesn't use metafields nor calls any metafields API but still sees following warning in logs. Upon digging further I found following line of code in this package from where I think it must be generating.

Notice:

API Deprecation Notice: {
   message: 'https://shopify.dev/changelog/online-store-2-0-new-metafields-type-system-and-dynamic-sources',
   path: 'https://test-store.myshopify.com/admin/api/2021-07/metafields.json?limit=1'
 }

Line in question:

await client.get({ path: "metafields", query: {'limit': 1} }) 

Expected behavior

Shouldn't see this notice in logs. Also thinking out loud, couldn't Shopify develop some dedicated API for this use case rather calling metafields which could cause auth issues if it ever goes down or has degraded performance?

Actual behavior

Seeing following notice in logs when using Session tokens for authentication.

API Deprecation Notice: {
   message: 'https://shopify.dev/changelog/online-store-2-0-new-metafields-type-system-and-dynamic-sources',
   path: 'https://test-store.myshopify.com/admin/api/2021-07/metafields.json?limit=1'
 }

Additional information

koa-shopify-auth: 4.1.3 shopify-api-node: ^3.6.5

Teetomania commented 3 years ago

I'm having the same issue. I'm only able to edit one item even if I select 10. Why is this so and what's the workaround?

thecodepixi commented 3 years ago

@Teetomania Please do not directly tag team members in issue comments unless they are already engaged in the discussion. Our entire team is notified for issues, so we promise we're already seeing your comments 😁 I just noticed a similar deprecation notice in my test app and will take a look into this.

Teetomania commented 3 years ago

@thecodepixi Oops, got it!

ilugobayo commented 3 years ago

Any news on this?

aldoalprak commented 2 years ago

it still happening on "@shopify/koa-shopify-auth": "^4.1.4",

avocadoslab commented 2 years ago

Received email from Shopify around these API Deprecations to be resolved by April 1st. Would appreciate update around this.

ilugobayo commented 2 years ago

Same here, and it's been almost half a year already with no response

snehapawar9910 commented 2 years ago

@thecodepixi sorry for tagging you here but at least give us some timeline. Given we are approaching deprecation deadline, we as a company has to decide whether to get off of this package to come in compliance with Shopify.

It's almost been 6 months but no updates yet so we would very much appreciate the attention.

TheSecurityDev commented 2 years ago

@thecodepixi sorry for tagging you here but at least give us some timeline. Given we are approaching deprecation deadline, we as a company has to decide whether to get off of this package to come in compliance with Shopify.

It's almost been 6 months but no updates yet so we would very much appreciate the attention.

My advice is to get off this package. I was running into a bunch of issues, so I took the library code and removed the code I didn't need (cookie stuff, etc) and modified it for my use, and now my app login flow performs so much better and I don't have to worry about deprecations, etc. I was also able to upgrade to Shopify Node API V2, which this library wouldn't let me do.

They also said somewhere else that this library is going to be deprecated soon.

snehapawar9910 commented 2 years ago

@thecodepixi sorry for tagging you here but at least give us some timeline. Given we are approaching deprecation deadline, we as a company has to decide whether to get off of this package to come in compliance with Shopify. It's almost been 6 months but no updates yet so we would very much appreciate the attention.

My advice is to get off this package. I was running into a bunch of issues, so I took the library code and removed the code I didn't need (cookie stuff, etc) and modified it for my use, and now my app login flow performs so much better and I don't have to worry about deprecations, etc. I was also able to upgrade to Shopify Node API V2, which this library wouldn't let me do.

They also said somewhere else that this library is going to be deprecated soon.

Thanks for additional information! Really appreciate your insight here.

Do you mind open sourcing your library? It would help so many out here to save hours reinventing the wheel. Appreciate your help.

TheSecurityDev commented 2 years ago

My advice is to get off this package. I was running into a bunch of issues, so I took the library code and removed the code I didn't need (cookie stuff, etc) and modified it for my use, and now my app login flow performs so much better and I don't have to worry about deprecations, etc. I was also able to upgrade to Shopify Node API V2, which this library wouldn't let me do.

They also said somewhere else that this library is going to be deprecated soon.

Thanks for additional information! Really appreciate your insight here.

Do you mind open sourcing your library? It would help so many out here to save hours reinventing the wheel. Appreciate your help.

I've never done that before, but I'll see what I can do.

TheSecurityDev commented 2 years ago

My advice is to get off this package. I was running into a bunch of issues, so I took the library code and removed the code I didn't need (cookie stuff, etc) and modified it for my use, and now my app login flow performs so much better and I don't have to worry about deprecations, etc. I was also able to upgrade to Shopify Node API V2, which this library wouldn't let me do. They also said somewhere else that this library is going to be deprecated soon.

Thanks for additional information! Really appreciate your insight here.

Do you mind open sourcing your library? It would help so many out here to save hours reinventing the wheel. Appreciate your help.

Here you go!

https://www.npmjs.com/package/simple-koa-shopify-auth https://github.com/TheSecurityDev/simple-koa-shopify-auth

I've been working on this all day, figuring out how to publish an NPM package, improving the code, and writing the documentation. This is my first time doing this and I'm really proud to have accomplished it.

Please let me know if you run into any issues. You might have to make a few changes to get it working, like upgrading to Shopify Node API v2.

I've always wanted to do something like this, so thank you for the nudge :) Also, please share this with anyone who is facing similar issues with the koa-shopify-auth library.

snehapawar9910 commented 2 years ago

Damn @TheSecurityDev awesome!! Congrats on your first npm package πŸŽ‰

Will give it it a try in few days. If you are on Shopify partner slack, feel free to share it in #app-dev channel.

agustinsacco commented 2 years ago

Any news on this, my new app submission is getting rejected for this reason. I am super happy to upgrade when a new package becomes available and run regression on my app.

It feels a bit weird to get denied a new app when I am using Shopify's recommended setup.

Any news would help me make an decision on how to move forward.

TheSecurityDev commented 2 years ago

Any news on this, my new app submission is getting rejected for this reason. I am super happy to upgrade when a new package becomes available and run regression on my app.

It feels a bit weird to get denied a new app when I am using Shopify's recommended setup.

Any news would help me make an decision on how to move forward.

Please checkout my package that fixes this issue: https://github.com/TheSecurityDev/simple-koa-shopify-auth

Michael-Gibbons commented 2 years ago

Having the same issue. Why is the shopify app cli using a package so out of date that it inhibits actually publishing apps, the purpose of the app cli. Hope to see a fix for this.

snehapawar9910 commented 2 years ago

Hey @paulomarg, @atesgoral sorry for tagging you here as @thecodepixi is not responsive at all. This issue needs serious attention as hundred's of developers are stuck & also our new apps are getting rejected by Shopify.

Also recently I've seen this metafields call timing out multiple times throughout the day so not sure if that's best solution out there.

await client.get({ path: "metafields", query: {'limit': 1} }) 
paulomarg commented 2 years ago

Hey folks, thanks for reporting this, and sorry for the long overdue response. We will replace the deprecated call with one that is up to date and publish a new version of the package.

JaKXz commented 2 years ago

πŸ‘‹πŸ½ hey everyone, this has been patched and released in v4.1.5. Please let us know if you see any further issues related to publishing.

Special shoutout to @TheSecurityDev:

I've always wanted to do something like this, so thank you for the nudge :)

thank you for being part of our community!

mcjambi commented 2 years ago

i have the same issue although i am using latest API!