Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[FEATURE] Add a fixed callback port for browser authentication

未关闭
#286 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

首先跟踪 auth 登录解析器和命令,直到核心身份验证实现。检查 issue 中描述的现有错误处理、文档、测试和 Changie 条目。当 redirect-port 的行为和验证能够正常工作,且不改变默认的 login 或 silent-cache 行为时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Use Case / Problem

Interactive browser authentication currently lets MSAL choose an ephemeral localhost callback port. When Fabric CLI runs on a remote machine over SSH, users cannot reliably preconfigure port forwarding between the local browser and the remote callback listener.

Proposed Solution

Add fab auth login --redirect-port <port> for interactive user authentication.

Expected behavior:

  • Accept ports 1 through 65535.
  • Skip authentication-method selection and use browser authentication when interaction is required.
  • Pass the fixed port to MSAL's local callback listener.
  • Temporarily disable Windows/macOS authentication brokers so MSAL honors the port.
  • Reject combinations with Azure CLI, managed identity, and service-principal options.
  • Return an actionable error when the port cannot be bound.
  • Preserve existing silent-cache behavior and all default login behavior when omitted.

Remote usage:

ssh -o ExitOnForwardFailure=yes -L 8400:127.0.0.1:8400 user@remote
BROWSER=echo fab auth login --redirect-port 8400

Alternatives Considered

  • Device-code authentication: useful for headless environments but does not provide the same browser callback flow and is tracked separately in #215.
  • Relying on an ephemeral port: cannot be forwarded predictably before login.
  • Preflight-binding the port: introduces a race; the implementation should let MSAL perform the real bind.

Impact Assessment

  • This would help me personally
  • This would help my team/organization
  • This would help the broader fabric-cli community

Implementation Attestation

  • I understand this feature should maintain backward compatibility with existing commands
  • I confirm this feature request does not introduce performance regressions for existing workflows
  • I acknowledge that new features must follow fabric-cli's established patterns and conventions

Implementation Notes

I have a tested implementation ready in my fork and would like maintainer acknowledgment before opening the PR, per the contribution guide. Please add the help wanted label if the team accepts this contribution. The implementation includes parser, command, core auth, error handling, documentation, tests, and a Changie entry.

主要语言
Python
星标
178
派生
65
平均合并
2 天 22 小时
30 天内合并 PR
5

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/fabric-cli 的其他 Issue

查看 microsoft/fabric-cli 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。