What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Can not login via Shopif CLI scope is invalid

Solved

Can not login via Shopif CLI scope is invalid

lokki54
Shopify Partner
55 0 15

I generate a shopify function cart-transformer via Shopify CLI command. 

No changes yet I just run shopify app deploy and it ask for login however when I visit a link returned by shopify to login 

 

http://accounts.shopify.com/oauth/authorize?client_id=**********&scope=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly+https%3A%2F%2Fapi.shopify.com%2Fauth%2Forganization.apps.manage&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&state=0e1ee7fc55b9d0f8e******a6391f02cf415a&response_type=code&code_challenge_method=S256&code_challenge=fixqY***

 

 

the reply is 

The requested scope is invalid, unknown, or malformed.

 

So where I can define the scopes? I check my .ENV and shopify.extension.toml and shopify.app.toml and initializers/shopify_app.rb and I dont have the OPENID scope (see it is mentioned in the URL). 

 

So what scopes are required for shopify function cart-transformer and where to define them?

Accepted Solution (1)

jellytree
Visitor
1 1 1

This is an accepted solution.

Hi - i ran into this issue too - it seems to be a bug with the latest version of the CLI (3.61.0) - my fix was to uninstall the latest version and install the previous version (3.60.1) via npm install -g @Shopify/cli@3.60.1

I could then shopify theme dev as normal

Hope this helps!

View solution in original post

Replies 2 (2)

jellytree
Visitor
1 1 1

This is an accepted solution.

Hi - i ran into this issue too - it seems to be a bug with the latest version of the CLI (3.61.0) - my fix was to uninstall the latest version and install the previous version (3.60.1) via npm install -g @Shopify/cli@3.60.1

I could then shopify theme dev as normal

Hope this helps!

lokki54
Shopify Partner
55 0 15

Thank you. I rollback the cli to older version but that not help until I have completely remove the @Shopify/theme

I am on @Shopify/cli 3.58.0