github / github/app

Session creation shows generic "Failed to initialize workspace" when SAML SSO token expires

未关闭
#2,955 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

## Describe the bug
When an organization enforces SAML SSO and the OAuth token authorization lapses, creating a new session fails with `Session creation failed: Failed to initialize workspace`. The actual cause — a 403 with "you must re-authorize the OAuth Application" — is only visible in `~/.copilot/logs/`.

## Expected behavior
1. The UI should surface the SAML SSO error directly, ideally with a clickable re-authorization link
2. After re-authorizing on GitHub.com, the app should automatically detect the refreshed authorization and retry — not require a full app restart

## Steps to reproduce
1. Be a member of an org with enforced SAML SSO
2. Wait for SSO authorization to expire
3. Try to create a new session in a repo owned by that org
4. See generic "Failed to initialize workspace"

## Logs
```
fatal: unable to access '...': The requested URL returned error: 403
remote: The 'org' organization has enabled or enforced SAML SSO.
remote: To access this repository, you must re-authorize the OAuth Application 'GitHub'.
```

## Environment
- Windows, Copilot app v1.0.80

贡献指南

打开贡献指南

调研方向

Reproduce session creation on Windows with an organization enforcing SAML SSO, then inspect ~/.copilot/logs/ while tracing the desktop UI's new-session flow. Verify that the 403 and re-authorization link are surfaced, and that the refreshed authorization is detected so session creation retries without restarting the app.

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

评估

技术栈
github
领域
authentication, authorization, desktop
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

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