Shopify / koa-shopify-auth

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

Default Access Mode is reverse of what is described in docs #127

Closed misshula closed 1 year ago

misshula commented 3 years ago

When reading the Docs on Access Modes (Offline vs Online)

Offline is the default access mode when none is specified.

as seen here: https://shopify.dev/apps/auth/access-modes#offline-access

Online access must be explicitly requested during the authorization phase of OAuth.

as seen here: https://shopify.dev/apps/auth/access-modes#online-access

But, when using the Shopify CLI - it isn't obvious why you cannot make offline admin API calls... until you read this line: https://github.com/Shopify/koa-shopify-auth/blob/e70874f1cfc64bd01733fd98e1a14e45293bed83/src/auth/index.ts#L14

The fix is easy enough - be explicit:

createShopifyAuth({
    accessMode: 'offline',
paulomarg commented 3 years ago

Thanks for pointing this out, we'll look into it!

hugo4711 commented 2 years ago

After about 3 months of bugfixing, searching in forums and annoying our customers, this issue here popped up to our attention...

This is completely misleading because koa is deviating from the official shopify documentation.

koa should define 'offline' mode as default, just like the official documentation says...

lukeclifton commented 2 years ago

I raised this back in Feb 21 but the response was it defaults to online by design. Not entirely sure why this though? Seems to trip quite a few people up.

github-actions[bot] commented 1 year ago

Note that this repo is no longer maintained and this issue will not be reviewed. Prefer the official JavaScript API library. If you still want to use Koa, see simple-koa-shopify-auth for a potential community solution.