Login to Wrangler in WSL+VSCode Dev Containers
When attempt to log in to wrangler in WSL + VSCode dev containers...
bash
npx wrangler login
Shows Failed to open
and the browser does not open automatically, but we can open the link in the browser:
At this step, open the browser developer tools and switch to Network
monitoring. Keep this state and click Allow
to log in.
You can see a callback...
request in the Network
, right-click on it → Copy
→ Copy as cURL (bash)
Do not close the terminal where you logged in, open another terminal and paste the copied content:
After sending the request, switch back to the original terminal and find that the login is successful!