Session creation shows generic "Failed to initialize workspace" when SAML SSO token expires
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 2.1k
- Fork
- 153
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Tái hiện việc tạo phiên trên Windows với một tổ chức thực thi SAML SSO, sau đó kiểm tra ~/.copilot/logs/ trong khi theo dõi luồng tạo phiên mới của UI desktop. Xác minh rằng 403 và liên kết ủy quyền lại được hiển thị, đồng thời việc ủy quyền đã được làm mới được phát hiện để việc tạo phiên được thử lại mà không cần khởi động lại ứng dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github
- Lĩnh vực
- authentication, authorization, desktop
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 52/100