# Codex extension not opening authorization url correctly

**URL:** <https://community.firebasestudio.dev/t/codex-extension-not-opening-authorization-url-correctly/18812>\
**Category:** AI\
**Created:** [September 5, 2025, 2:35pm UTC](https://community.firebasestudio.dev/t/codex-extension-not-opening-authorization-url-correctly/18812 "2025-09-05T14:35:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shreyank\_Jadiya](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/shreyank_jadiya/32/2750_2.png) [@Shreyank\_Jadiya](https://community.firebasestudio.dev/u/Shreyank_Jadiya)\
**Post date:** [September 5, 2025, 2:35pm UTC](https://community.firebasestudio.dev/t/codex-extension-not-opening-authorization-url-correctly/18812/1 "2025-09-05T14:35:59Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/idxcommunity/original/2X/1/15de0201d400badc4d7d63f179136d069abde5a9.png)

---

<div class="post-metadata">

**Author:** ![Vu\_Dung\_Pham](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/vu_dung_pham/32/5256_2.png) [@Vu\_Dung\_Pham](https://community.firebasestudio.dev/u/Vu_Dung_Pham)\
**Post date:** [September 30, 2025, 4:53am UTC](https://community.firebasestudio.dev/t/codex-extension-not-opening-authorization-url-correctly/18812/2 "2025-09-30T04:53:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![David\_Tweeto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/david_tweeto/32/10762_2.png) [@David\_Tweeto](https://community.firebasestudio.dev/u/David_Tweeto)\
**Post date:** [October 23, 2025, 10:31pm UTC](https://community.firebasestudio.dev/t/codex-extension-not-opening-authorization-url-correctly/18812/3 "2025-10-23T22:31:31Z")

</div>

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:

```auto
"dev": "next dev --turbopack -p 9002"

```

Right below it, add this new script:

```auto
"dev:1455": "next dev --turbopack -p 1455"

```

## Step 2: Configure Public Ports in Firebase Studio

1. Open the **Command Palette** (`Ctrl` + `Shift` + `P`)

2. Search for **“ports”**

3. Select **“Get Public Ports”** and **note your currently open ports!**

4. Then select **“Update Public Ports”**

5. Add **`1455`** to the list of existing open ports and press **Enter**

6. Verify by running **“Get Public Ports”** again — you should now see the new **1455** port listed

## Step 3: Log In to Codex

1. Click the **Codex sign-in button** (but don’t open it yet)

2. Copy the **sign-in URL**

3. Open a **new browser tab** and paste the URL

4. Complete the login process to your account

## Step 4: Run Your Dev Server on Port 1455

In your Firebase Studio terminal, run:

```auto
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:

```auto
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:

```auto
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

1. Stop the running `dev:1455` process (you can close or kill the terminal)

2. Remove the `"dev:1455"` line from your **`package.json`**

3. Open **“Update Public Ports”** again and restore only your original ports (remove `1455`)

---

<div class="post-metadata">

**Author:** ![Shreyank\_Jadiya](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/shreyank_jadiya/32/2750_2.png) [@Shreyank\_Jadiya](https://community.firebasestudio.dev/u/Shreyank_Jadiya)\
**Post date:** [January 20, 2026, 3:43am UTC](https://community.firebasestudio.dev/t/codex-extension-not-opening-authorization-url-correctly/18812/4 "2026-01-20T03:43:43Z")

</div>

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.
