Shopify / koa-shopify-auth

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

Updated for the new version of @shopify/shopify-api #143

Closed elizbaryousuf closed 2 years ago

elizbaryousuf commented 2 years ago

Hello there,

I have updated this package for the new version of @shopify/shopify-api (2.1.0)

Shopify.Utils.loadCurrentSession assigned for ctx.state.shopify has been removed, instead Shopify.Auth.validateAuthCallback which returns the current session has been assigned to it.

And I changed the test for the auth callback for the new changes.

Thanks!

caution-tape-bot[bot] commented 2 years ago

:wave: It looks like you're updating JavaScript packages that are known to cause problems when duplicated.

You can deduplicate them with the yarn-deduplicate utility:

npx yarn-deduplicate --packages graphql react react-dom webpack
npx yarn-deduplicate --scopes @shopify @apollo

If running these commands doesn't produce a change in your yarn.lock file, you didn't have duplications in these packages and can carry on.

A duplicate React version may cause an invalid hook call warning.

React context providers usually use module-scoped globals as their default context values. Multiple versions of such packages will yield multiple global instances, resulting in oblique runtime errors.