Shopify CLI Repeatedly Requires Authentication, Frequent Logouts and 2FA Prompts (v3.80.7)

I’m running into a frustrating issue with the latest Shopify CLI (v3.80.7) on macOS

The CLI repeatedly logs me out or invalidates my session token, sometimes within 5 minutes, sometimes instantly after a successful command, and occasionally it lasts about an hour before prompting again. It’s been like this for about 2 months.

Each time it happens, I’m forced to:

  • Go through browser auth
  • Re-enter password and complete 2FA
  • Repeat this 2–3 times during a normal development session

This is severely impacting my workflow. I’ve already confirmed I’m on the latest CLI release, and the behavior persists across projects and terminal sessions.

Has anyone else encountered this? Any workarounds or environment settings I might have missed?

Would appreciate any insight, happy to provide logs or steps to reproduce if needed.

1 Like

Hi Ayush, i’m sorry you are experiencing difficulties with the authentication flow.

Could you share more details?

  • Does it happen with every command or with some specific ones like app dev?
  • Are you using extensions? If so, which types and how many?

We’ve been working on some improvements that are going to be released this week, in the meantime can you try with the nightly version of the CLI to see if it solves your issues?

npm i -g @shopify/cli@nightly

Thanks!

It’s happening with shopify app dev and shopify app deploy

I tried the nightly version but it does not seem to solve it

The app has a lot of extensions for flow, customer accounts, admin and post-purchase-ui

@Ayush Would you mind sharing the output of shopify app info? You can redact names/IDs.

Sure, here you go

CURRENT APP CONFIGURATION                                                   

Configuration file  shopify.app.toml                                        
App name            Snowdevil - Ayush                                       
Client ID           ******************************************************  
Access scopes       read_all_orders,read_assigned_fulfillment_orders,read_  
                    customers,read_discounts,read_draft_orders,read_invent  
                    ory,read_merchant_managed_fulfillment_orders,read_orde  
                    r_edits,read_orders,read_price_rules,read_products,rea  
                    d_shipping,read_store_credit_accounts,read_third_party  
                    _fulfillment_orders,write_assigned_fulfillment_orders,  
                    write_customer_merge,write_discounts,write_draft_order  
                    s,write_inventory,write_merchant_managed_fulfillment_o  
                    rders,write_order_edits,write_orders,write_price_rules  
                    ,write_store_credit_account_transactions,write_third_p  
                    arty_fulfillment_orders                                 
Dev store           snowdevil.myshopify.com                                 
Update URLs         Yes                                                     
User                ****************                                       

💡 To change these, run `shopify app config link`                           

YOUR PROJECT                                                                

Root location  /Users/ayush/snowdevil                                       


DIRECTORY COMPONENTS                                                        

web                                                                         
📂 web                                                                      
    📂 remix    admin                                                       
        roles  frontend, backend                                           

ui_extension                                                                
[redacted]                               

TOOLING AND SYSTEM                                                          

Shopify CLI      0.0.0-nightly-20250611104445                               
Package manager  npm                                                        
OS               darwin-arm64                                               
Shell            /bin/zsh                                                   
Node version     v22.13.1                                                   

So it also happens with an app with a single UI extension?

I’m not able to reproduce it. Could you run shopify app dev --verbose 2>log.txt and then share the log.txt file after you hit the problem again? With the CLI v3.81.0, please.

Seems to be stable now, thanks!