Tried installing openai’s codex extension to my workspace and when clicking on signin, it prompts to open the authorization url and upon clicking it, it shows the blank page with “not found“ message.
Is there any way to fix this ? Could not find the information anywhere.
2 Likes
When it asks you to open the authourization url, dont open it, instead copy it, then open a new tab, paste it and log in to you account
When you reach the last step, it will try to callback to localhost/:1455. Back to your firebase studio, find the running process on port 1455, public the port, copy the url then replace the localhost/:1455 with the url, hit enter and you’re good to go
1 Like
I ran into the same problem that led me here when searching for Codex setup help.
I initially struggled to follow the solution from Vu_Dung_Pham, so here’s what worked for me (non-developer
), after a long session with ChatGPT, step by step.
Step 1: Edit package.json
In your project’s explorer, open the package.json file.
Inside the "scripts" section, you’ll see something like:
"dev": "next dev --turbopack -p 9002"
Right below it, add this new script:
"dev:1455": "next dev --turbopack -p 1455"
Step 2: Configure Public Ports in Firebase Studio
-
Open the Command Palette (Ctrl + Shift + P)
-
Search for “ports”
-
Select “Get Public Ports” and note your currently open ports!
-
Then select “Update Public Ports”
-
Add 1455 to the list of existing open ports and press Enter
-
Verify by running “Get Public Ports” again — you should now see the new 1455 port listed
Step 3: Log In to Codex
-
Click the Codex sign-in button (but don’t open it yet)
-
Copy the sign-in URL
-
Open a new browser tab and paste the URL
-
Complete the login process to your account
Step 4: Run Your Dev Server on Port 1455
In your Firebase Studio terminal, run:
npm run dev:1455
Then, in your web preview tab, click “Open in new window.”
A new tab will open with a URL that looks something like:
https://9000-firebase-studio-XXXXXXXXXXXXXXXX.cloudworkstations.dev/
Replace 9000 with 1455, and hit Enter.
Step 5: Complete the Callback
After completing the Codex sign-in, copy everything after the first “/” from your callback URL.
Paste it into your 1455 URL so it looks like this:
https://1455-firebase-studio-XXXXXXXXXXXXXXXX.cloudworkstations.dev/auth/callback?code=XXXXXXXXXXXX
Hit Enter, and you should see a confirmation screen.
You are now signed in!
Step 6: Clean Up
-
Stop the running dev:1455 process (you can close or kill the terminal)
-
Remove the "dev:1455" line from your package.json
-
Open “Update Public Ports” again and restore only your original ports (remove 1455)
Thank you to Both @Vu_Dung_Pham and @David_Tweeto For the amazing answers. Both are correct and basically the same. I have marked Vu_Dung_Pham answer as solution as it is general and works for any project and not only nextjs project. All you need is a cluster public url, public the 1455 port and copying the link for codex rather than directly opening it and to mention, david did a good job explaining it cleanly with a nextjs project example.