Azure-Samples / Azure-Samples/llama-index-javascript

`azd auth login` will fail in GitHub CodeSpaces Browser

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
76
Forks
33
Avg merge
5d 20h
Merged PRs (30d)
1

Description

**Describe the bug**
Clicking the `Open in GitHub Codespaces` button will open the sample in GitHub Codespaces in web browser. The README ask us to run `azd auth login` command in terminal. Running this command in browser will have error:

**To Reproduce**
Steps to reproduce the behavior:
1. Go to [AI app templates sample page](https://azure.github.io/ai-app-templates/repo/azure-samples/llama-index-javascript/)
2. Click on `Open in GitHub Codespaces` button. This will open the sample in GitHub Codespaces in web browser.
3. Run `azd auth login` command in VS Code terminal.

![Image](https://github.com/user-attachments/assets/d03456cb-d317-471d-87b0-8c449d7438e0)

4. See error: `localhost refused to connect.`

**Expected behavior**
When connect to the GitHub Codespaces via VS Code desktop locally, the `azd auth login` command can successfully logged in.

**Screenshots**
![Image](https://github.com/user-attachments/assets/58ad5fec-c45e-4383-bcc3-51e14c11aa0e)
hyperlink: http://localhost:42025/?code=xxx&session_state=xxx

**Desktop (please complete the following information):**
- OS: Microsoft Windows 11 Enterprise. 10.0.26100 Build 26100
- Browser Chrome
- Version [e.g. 22]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.