Can't connect to WP Engine to push/pull - Localhost Oauth is forbidden

What issue or error are you experiencing?

On windows 11, I cannot connect to WP Engine to push/pull site content. When I connect via the UI on an individual site or in the connect tab, I can log into WP engine at identity.wpengine.com, and then am redirected back to localhost:49054/callback, which gives me “Forbidden” and the login does not succeed. I can successfully log in to localwp.com via the top left menu, but not to wpengine.com. There seems to be an issue with the local express/oath server that Local runs to authenticate against WP Engine. The site starts correctly at its [site].local URL.

As of a month or two ago, this worked correctly.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

I tried reinstalling Local, logging out and in again, checking netstat to make sure the ports are being used by the local PID, checked hosts file. The local graphql server is responsive at http://localhost:4000/graphql, so Local can start a server. API access is enabled on the WP Engine account.

2024-03-07 16_42_25-Slack - Threads - XDS - 1 new item


System Details

  • Local Version:
    8.3.1+6650

  • Operating System (OS) and OS version:

Edition Windows 11 Pro
Version 23H2
Installed on ‎4/‎15/‎2023
OS build 22631.3235
Experience Windows Feature Experience Pack 1000.22687.1000.0

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

local-logs.zip (1.2 MB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @alecc

If you downgrade to a previous version of Local are you able to reset and get this working?

Yes! Thank you!

I downgraded to Version 8.1.0+6514 (I chose the version semi-randomly) and it showed me as still logged in to WPE, and the push/pull connection works. Assume this is a stale credential somewhere that needs to be deleted between installs? Any idea what to do in order to upgrade again? Let me know if you want logs uploaded or anything.

@alecc

If you have time to troubleshoot you can update your app by checking for updates or manually downloading the latest release from here: Releases - Local

Once you have that set up you could run through these steps to see if they resolve the problem:

  • Disconnect Local from WP Engine (log out inside of Local within Preferences > Connected Accounts)

  • Delete unused SSH keys from WP Engine Portal (https://my.wpengine.com/profile/ssh_keys → If the key starts with Local Connect for… you’re safe to delete - Local will regenerate it the next time it tries!)

  • Delete unused SSH keys from your machine - delete the Application Support/Local/ssh (Mac) / AppData\Roaming\Local\ssh (Windows) folder from your machine. Again, Local will regenerate on the next push!

  • Try connecting Local to WP Engine again in the Connect process and try pushing or pulling your site.

  • This will trigger Local to generate and submit a new, hopefully unique, key!